Skip to content

Commit

Permalink
add sesrchField for search property by name
Browse files Browse the repository at this point in the history
  • Loading branch information
Sachin-chaurasiya committed Oct 14, 2024
1 parent d728b46 commit 7fefe1d
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@ const AddCustomProperty = () => {
const title = startCase(getEntityName(type).replace(/-cp/g, ''));

return {
key: title,
searchField: title,
key: type.name,
label: (
<div className="d-flex gap-2 items-center" title={title}>
{Icon && <Icon width={20} />}
Expand Down Expand Up @@ -294,8 +295,8 @@ const AddCustomProperty = () => {
field: t('label.type'),
})}`,
showSearch: true,
filterOption: (input: string, option: { key: string }) => {
return (option?.key ?? '')
filterOption: (input: string, option: { searchField: string }) => {
return (option?.searchField ?? '')
.toLowerCase()
.includes(input.toLowerCase());
},
Expand Down

0 comments on commit 7fefe1d

Please sign in to comment.