mirror of
https://github.com/twentyhq/twenty.git
synced 2024-11-23 22:12:24 +03:00
Prevent setting addition from being broken
This commit is contained in:
parent
fd9467c54d
commit
7e7bd6b9e7
@ -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,
|
||||
});
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user