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:
2022-08-24 11:34:58 +08:00
parent 329f810c4d
commit 7772d343d3

View File

@ -157,6 +157,7 @@ export default class FormItem extends React.Component {
checkOptions,
checkBoxInfo,
allowClear,
required,
...rest
} = this.props;
return {
@ -171,7 +172,7 @@ export default class FormItem extends React.Component {
optionFilterProp,
checkOptions,
checkBoxInfo,
allowClear,
allowClear: required ? allowClear || false : allowClear,
...rest,
};
}