Prevent setting addition from being broken

This commit is contained in:
Charles Bochet 2023-12-03 12:01:37 +01:00
parent fd9467c54d
commit 7e7bd6b9e7
2 changed files with 6 additions and 5 deletions

View File

@ -16,7 +16,7 @@ export const useRelationFieldPreviewValue = ({
: undefined;
const { records: relationObjects } = useFindManyRecords({
objectNameSingular: relationObjectMetadataItem?.nameSingular ?? '',
objectNameSingular: relationObjectMetadataItem?.nameSingular ?? 'company', // TODO fix this hack
skip: skip || !relationObjectMetadataItem,
});

View File

@ -60,14 +60,15 @@ export const IconPicker = ({
const { icons, isLoadingIcons: isLoading } = useLazyLoadIcons();
const iconKeys = useMemo(() => {
const filteredIconKeys = Object.keys(icons).filter(
(iconKey) =>
const filteredIconKeys = Object.keys(icons).filter((iconKey) => {
return (
iconKey !== selectedIconKey &&
(!searchString ||
[iconKey, convertIconKeyToLabel(iconKey)].some((label) =>
label.toLowerCase().includes(searchString.toLowerCase()),
)),
);
))
);
});
return (
selectedIconKey