Skip to content

Commit

Permalink
fix(filterpicker): modify width of selector in the FilterPicker (#1616)
Browse files Browse the repository at this point in the history
Co-authored-by: maxin <maxin@growingio.com>
  • Loading branch information
nnmax and maxin authored Dec 6, 2021
1 parent 4d8de84 commit e173d78
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 8 deletions.
5 changes: 2 additions & 3 deletions src/legacy/date-picker/dateRangePicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export const DateRangePicker: React.FC<DateRangePickerProps> = (props: DateRange
showFooter,
disabledDate,
disabled,
renderExtraFooter,
} = props;
const prefixCls = usePrefixCls('date-picker-legacy', customizePrefixCls);

Expand All @@ -29,9 +30,7 @@ export const DateRangePicker: React.FC<DateRangePickerProps> = (props: DateRange

const renderFooter = () => (
<>
{props.renderExtraFooter && (
<div className={classNames(`${prefixCls}-extra-footer`)}>{props.renderExtraFooter()}</div>
)}
{renderExtraFooter && <div className={classNames(`${prefixCls}-extra-footer`)}>{renderExtraFooter()}</div>}
<Button onClick={footerField.onCancel} type="secondary" size="middle" style={{ margin: ' 0 12px 0 0 ' }}>
取消
</Button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ function FilterCondition(props: FilterConditionProps) {

return exprKey ? (
<Selector
style={{ width: 250 }}
valueRender={valueRender}
dropdownVisible={visible}
dropdownRender={dropdownRender}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
color: #313e75;
font-size: 14px;
line-height: 22px;
text-align: center;
text-align: left;
vertical-align: middle;
border-radius: 4px;

Expand Down
6 changes: 4 additions & 2 deletions src/legacy/list-pro/option.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ const SelectOption = (props: OptionProps) => {
option,
getPopupContainer,
placement,
title,
children,
} = props;

const prefixCls = usePrefixCls('select-legacy');
Expand Down Expand Up @@ -51,7 +53,7 @@ const SelectOption = (props: OptionProps) => {
})}
style={style}
onClick={disabled ? undefined : handleSelect}
title={props.title}
title={title}
ref={ref}
aria-hidden="true"
>
Expand All @@ -62,7 +64,7 @@ const SelectOption = (props: OptionProps) => {
<span style={{ width: 8 }} />
</>
)}
{props.children}
{children}
</div>
);

Expand Down
2 changes: 1 addition & 1 deletion src/radio/Group.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ const InnerGroup: React.ForwardRefRenderFunction<HTMLDivElement, IRadioGroupProp
});

const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {
if (!props.value) {
if (!value) {
setSelectedValue(e.target.value);
}
if (onChange && e.target.value !== prevSelectedValue) {
Expand Down
2 changes: 1 addition & 1 deletion src/switchGroup/Group.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ const InnerGroup: React.ForwardRefRenderFunction<HTMLDivElement, ISwitchGroupPro
});

const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {
if (!props.value) {
if (!value) {
setSelectedValue(e.target.value);
}
if (onChange && e.target.value !== prevSelectedValue) {
Expand Down

1 comment on commit e173d78

@vercel
Copy link

@vercel vercel bot commented on e173d78 Dec 6, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.