Fix bug IconPicker
This commit is contained in:
@ -95,18 +95,20 @@ export const IconPicker = ({
|
||||
const { closeDropdown } = useDropdown({ dropdownScopeId });
|
||||
|
||||
const { getIcons, getIcon } = useIcons();
|
||||
const { icons } = getIcons();
|
||||
const icons = getIcons();
|
||||
|
||||
const iconKeys = useMemo(() => {
|
||||
const filteredIconKeys = Object.keys(icons).filter((iconKey) => {
|
||||
return (
|
||||
iconKey !== selectedIconKey &&
|
||||
(!searchString ||
|
||||
[iconKey, convertIconKeyToLabel(iconKey)].some((label) =>
|
||||
label.toLowerCase().includes(searchString.toLowerCase()),
|
||||
))
|
||||
);
|
||||
});
|
||||
const filteredIconKeys = icons
|
||||
? Object.keys(icons).filter((iconKey) => {
|
||||
return (
|
||||
iconKey !== selectedIconKey &&
|
||||
(!searchString ||
|
||||
[iconKey, convertIconKeyToLabel(iconKey)].some((label) =>
|
||||
label.toLowerCase().includes(searchString.toLowerCase()),
|
||||
))
|
||||
);
|
||||
})
|
||||
: [];
|
||||
|
||||
return (
|
||||
selectedIconKey
|
||||
|
||||
Reference in New Issue
Block a user