diff --git a/src/components/Dashboard/common/ObjectTypeSelect.jsx b/src/components/Dashboard/common/ObjectTypeSelect.jsx index 58c96ca..03cc17f 100644 --- a/src/components/Dashboard/common/ObjectTypeSelect.jsx +++ b/src/components/Dashboard/common/ObjectTypeSelect.jsx @@ -17,7 +17,8 @@ const ObjectTypeSelect = ({ .sort((a, b) => a.label.localeCompare(b.label)) .map((model) => ({ value: model.name, - label: + label: , + 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} />