Fixed object type search bug
This commit is contained in:
parent
aeebaaddda
commit
b12d230a8e
@ -17,7 +17,8 @@ const ObjectTypeSelect = ({
|
||||
.sort((a, b) => a.label.localeCompare(b.label))
|
||||
.map((model) => ({
|
||||
value: model.name,
|
||||
label: <ObjectTypeDisplay objectType={model.name} />
|
||||
label: <ObjectTypeDisplay objectType={model.name} />,
|
||||
searchText: model.label?.toLowerCase() || ''
|
||||
}))
|
||||
|
||||
return (
|
||||
@ -31,9 +32,7 @@ const ObjectTypeSelect = ({
|
||||
allowClear={allowClear}
|
||||
disabled={disabled}
|
||||
filterOption={(input, option) =>
|
||||
option.label.props.children[1].props.children
|
||||
.toLowerCase()
|
||||
.indexOf(input.toLowerCase()) >= 0
|
||||
option.searchText?.includes(input.toLowerCase()) ?? false
|
||||
}
|
||||
options={options}
|
||||
/>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user