fix(select-component): remove filter sort
This commit is contained in:
parent
d25276a23b
commit
6f4f601ba8
@ -65,6 +65,8 @@ const ObjectSelect = (props: Props) => {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const filterOption = (input, option) => (option?.label ?? '').toLowerCase().includes((input || '').toLowerCase());
|
||||||
|
|
||||||
export const Select = connect(
|
export const Select = connect(
|
||||||
(props: Props) => {
|
(props: Props) => {
|
||||||
const { objectValue, ...others } = props;
|
const { objectValue, ...others } = props;
|
||||||
@ -74,10 +76,7 @@ export const Select = connect(
|
|||||||
return (
|
return (
|
||||||
<AntdSelect
|
<AntdSelect
|
||||||
showSearch
|
showSearch
|
||||||
filterOption={(input, option) => (option?.label ?? '').includes(input)}
|
filterOption={filterOption}
|
||||||
filterSort={(optionA, optionB) =>
|
|
||||||
(optionA?.label ?? '').toLowerCase().localeCompare((optionB?.label ?? '').toLowerCase())
|
|
||||||
}
|
|
||||||
allowClear
|
allowClear
|
||||||
{...others}
|
{...others}
|
||||||
onChange={(changed) => {
|
onChange={(changed) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user