mirror of
https://github.com/twentyhq/twenty.git
synced 2024-11-24 06:48:42 +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;
|
: undefined;
|
||||||
|
|
||||||
const { records: relationObjects } = useFindManyRecords({
|
const { records: relationObjects } = useFindManyRecords({
|
||||||
objectNameSingular: relationObjectMetadataItem?.nameSingular ?? '',
|
objectNameSingular: relationObjectMetadataItem?.nameSingular ?? 'company', // TODO fix this hack
|
||||||
skip: skip || !relationObjectMetadataItem,
|
skip: skip || !relationObjectMetadataItem,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -60,14 +60,15 @@ export const IconPicker = ({
|
|||||||
const { icons, isLoadingIcons: isLoading } = useLazyLoadIcons();
|
const { icons, isLoadingIcons: isLoading } = useLazyLoadIcons();
|
||||||
|
|
||||||
const iconKeys = useMemo(() => {
|
const iconKeys = useMemo(() => {
|
||||||
const filteredIconKeys = Object.keys(icons).filter(
|
const filteredIconKeys = Object.keys(icons).filter((iconKey) => {
|
||||||
(iconKey) =>
|
return (
|
||||||
iconKey !== selectedIconKey &&
|
iconKey !== selectedIconKey &&
|
||||||
(!searchString ||
|
(!searchString ||
|
||||||
[iconKey, convertIconKeyToLabel(iconKey)].some((label) =>
|
[iconKey, convertIconKeyToLabel(iconKey)].some((label) =>
|
||||||
label.toLowerCase().includes(searchString.toLowerCase()),
|
label.toLowerCase().includes(searchString.toLowerCase()),
|
||||||
)),
|
))
|
||||||
);
|
);
|
||||||
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
selectedIconKey
|
selectedIconKey
|
||||||
|
Loading…
Reference in New Issue
Block a user