fix(select-component): remove filter sort

This commit is contained in:
chenos 2022-11-23 17:08:23 +08:00
parent d25276a23b
commit 6f4f601ba8

View File

@ -65,6 +65,8 @@ const ObjectSelect = (props: Props) => {
);
};
const filterOption = (input, option) => (option?.label ?? '').toLowerCase().includes((input || '').toLowerCase());
export const Select = connect(
(props: Props) => {
const { objectValue, ...others } = props;
@ -74,10 +76,7 @@ export const Select = connect(
return (
<AntdSelect
showSearch
filterOption={(input, option) => (option?.label ?? '').includes(input)}
filterSort={(optionA, optionB) =>
(optionA?.label ?? '').toLowerCase().localeCompare((optionB?.label ?? '').toLowerCase())
}
filterOption={filterOption}
allowClear
{...others}
onChange={(changed) => {