Fix bug IconPicker

This commit is contained in:
Charles Bochet 2023-12-14 14:41:51 +01:00
parent fd3b7ccd9a
commit 73e03dd0c4

View File

@ -95,10 +95,11 @@ 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) => {
const filteredIconKeys = icons
? Object.keys(icons).filter((iconKey) => {
return (
iconKey !== selectedIconKey &&
(!searchString ||
@ -106,7 +107,8 @@ export const IconPicker = ({
label.toLowerCase().includes(searchString.toLowerCase()),
))
);
});
})
: [];
return (
selectedIconKey