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