fix: allowClear property is set to false when select is required
optimizes the logic for allowClear property values, setting it to false when select is required Change-Id: I773831872b490ef49536039f2cef773939c0a361
This commit is contained in:
parent
329f810c4d
commit
7772d343d3
@ -157,6 +157,7 @@ export default class FormItem extends React.Component {
|
|||||||
checkOptions,
|
checkOptions,
|
||||||
checkBoxInfo,
|
checkBoxInfo,
|
||||||
allowClear,
|
allowClear,
|
||||||
|
required,
|
||||||
...rest
|
...rest
|
||||||
} = this.props;
|
} = this.props;
|
||||||
return {
|
return {
|
||||||
@ -171,7 +172,7 @@ export default class FormItem extends React.Component {
|
|||||||
optionFilterProp,
|
optionFilterProp,
|
||||||
checkOptions,
|
checkOptions,
|
||||||
checkBoxInfo,
|
checkBoxInfo,
|
||||||
allowClear,
|
allowClear: required ? allowClear || false : allowClear,
|
||||||
...rest,
|
...rest,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user