From e22b242ef8873cc18a8fb4bd6f38be7e2cbb4b5e Mon Sep 17 00:00:00 2001 From: Charles Bochet Date: Thu, 14 Dec 2023 19:05:10 +0100 Subject: [PATCH] Fix multiselect on activities --- .../hooks/useMapToObjectRecordIdentifier.ts | 2 +- .../relation-picker/components/MultipleEntitySelect.tsx | 7 ------- .../relation-picker/components/SingleEntitySelectBase.tsx | 4 ++-- 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/packages/twenty-front/src/modules/object-metadata/hooks/useMapToObjectRecordIdentifier.ts b/packages/twenty-front/src/modules/object-metadata/hooks/useMapToObjectRecordIdentifier.ts index 6a5caddd20..32c4fa6506 100644 --- a/packages/twenty-front/src/modules/object-metadata/hooks/useMapToObjectRecordIdentifier.ts +++ b/packages/twenty-front/src/modules/object-metadata/hooks/useMapToObjectRecordIdentifier.ts @@ -56,7 +56,7 @@ export const useMapToObjectRecordIdentifier = ({ const avatarUrl = objectMetadataItem.nameSingular === CoreObjectNameSingular.Company - ? getLogoUrlFromDomainName(imageIdentifierFieldValue ?? '') + ? getLogoUrlFromDomainName(record['domainName'] ?? '') : imageIdentifierFieldValue ?? null; return { diff --git a/packages/twenty-front/src/modules/object-record/relation-picker/components/MultipleEntitySelect.tsx b/packages/twenty-front/src/modules/object-record/relation-picker/components/MultipleEntitySelect.tsx index b2cb18d1c6..b080068673 100644 --- a/packages/twenty-front/src/modules/object-record/relation-picker/components/MultipleEntitySelect.tsx +++ b/packages/twenty-front/src/modules/object-record/relation-picker/components/MultipleEntitySelect.tsx @@ -10,7 +10,6 @@ import { DropdownMenuSearchInput } from '@/ui/layout/dropdown/components/Dropdow import { DropdownMenuSeparator } from '@/ui/layout/dropdown/components/DropdownMenuSeparator'; import { SelectableItem } from '@/ui/layout/selectable-list/components/SelectableItem'; import { SelectableList } from '@/ui/layout/selectable-list/components/SelectableList'; -import { useSelectableList } from '@/ui/layout/selectable-list/hooks/useSelectableList'; import { MenuItem } from '@/ui/navigation/menu-item/components/MenuItem'; import { MenuItemMultiSelectAvatar } from '@/ui/navigation/menu-item/components/MenuItemMultiSelectAvatar'; import { useListenClickOutside } from '@/ui/utilities/pointer-event/hooks/useListenClickOutside'; @@ -103,12 +102,6 @@ export const MultipleEntitySelect = < onChange({ ...value, [entity.id]: newCheckedValue }) diff --git a/packages/twenty-front/src/modules/object-record/relation-picker/components/SingleEntitySelectBase.tsx b/packages/twenty-front/src/modules/object-record/relation-picker/components/SingleEntitySelectBase.tsx index b4aff2c0e8..f33134efc7 100644 --- a/packages/twenty-front/src/modules/object-record/relation-picker/components/SingleEntitySelectBase.tsx +++ b/packages/twenty-front/src/modules/object-record/relation-picker/components/SingleEntitySelectBase.tsx @@ -75,12 +75,12 @@ export const SingleEntitySelectBase = ({ selectableListId="single-entity-select-base-list" selectableItemIdArray={selectableItemIds} hotkeyScope={RelationPickerHotkeyScope.RelationPicker} - onEnter={(_itemId) => { + onEnter={(itemId) => { if (showCreateButton) { onCreate?.(); } else { const entity = entitiesInDropdown.findIndex( - (entity) => entity.id === _itemId, + (entity) => entity.id === itemId, ); onEntitySelected(entitiesInDropdown[entity]); }