mirror of
https://github.com/twentyhq/twenty.git
synced 2024-09-19 20:18:19 +03:00
Fix multiselect on activities
This commit is contained in:
parent
36164ab59b
commit
e22b242ef8
@ -56,7 +56,7 @@ export const useMapToObjectRecordIdentifier = ({
|
|||||||
|
|
||||||
const avatarUrl =
|
const avatarUrl =
|
||||||
objectMetadataItem.nameSingular === CoreObjectNameSingular.Company
|
objectMetadataItem.nameSingular === CoreObjectNameSingular.Company
|
||||||
? getLogoUrlFromDomainName(imageIdentifierFieldValue ?? '')
|
? getLogoUrlFromDomainName(record['domainName'] ?? '')
|
||||||
: imageIdentifierFieldValue ?? null;
|
: imageIdentifierFieldValue ?? null;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
@ -10,7 +10,6 @@ import { DropdownMenuSearchInput } from '@/ui/layout/dropdown/components/Dropdow
|
|||||||
import { DropdownMenuSeparator } from '@/ui/layout/dropdown/components/DropdownMenuSeparator';
|
import { DropdownMenuSeparator } from '@/ui/layout/dropdown/components/DropdownMenuSeparator';
|
||||||
import { SelectableItem } from '@/ui/layout/selectable-list/components/SelectableItem';
|
import { SelectableItem } from '@/ui/layout/selectable-list/components/SelectableItem';
|
||||||
import { SelectableList } from '@/ui/layout/selectable-list/components/SelectableList';
|
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 { MenuItem } from '@/ui/navigation/menu-item/components/MenuItem';
|
||||||
import { MenuItemMultiSelectAvatar } from '@/ui/navigation/menu-item/components/MenuItemMultiSelectAvatar';
|
import { MenuItemMultiSelectAvatar } from '@/ui/navigation/menu-item/components/MenuItemMultiSelectAvatar';
|
||||||
import { useListenClickOutside } from '@/ui/utilities/pointer-event/hooks/useListenClickOutside';
|
import { useListenClickOutside } from '@/ui/utilities/pointer-event/hooks/useListenClickOutside';
|
||||||
@ -103,12 +102,6 @@ export const MultipleEntitySelect = <
|
|||||||
<SelectableItem itemId={entity.id} key={entity.id}>
|
<SelectableItem itemId={entity.id} key={entity.id}>
|
||||||
<MenuItemMultiSelectAvatar
|
<MenuItemMultiSelectAvatar
|
||||||
key={entity.id}
|
key={entity.id}
|
||||||
isKeySelected={
|
|
||||||
useSelectableList({
|
|
||||||
selectableListId: 'multiple-entity-select-list',
|
|
||||||
itemId: entity.id,
|
|
||||||
}).isSelectedItemId
|
|
||||||
}
|
|
||||||
selected={value[entity.id]}
|
selected={value[entity.id]}
|
||||||
onSelectChange={(newCheckedValue) =>
|
onSelectChange={(newCheckedValue) =>
|
||||||
onChange({ ...value, [entity.id]: newCheckedValue })
|
onChange({ ...value, [entity.id]: newCheckedValue })
|
||||||
|
@ -75,12 +75,12 @@ export const SingleEntitySelectBase = ({
|
|||||||
selectableListId="single-entity-select-base-list"
|
selectableListId="single-entity-select-base-list"
|
||||||
selectableItemIdArray={selectableItemIds}
|
selectableItemIdArray={selectableItemIds}
|
||||||
hotkeyScope={RelationPickerHotkeyScope.RelationPicker}
|
hotkeyScope={RelationPickerHotkeyScope.RelationPicker}
|
||||||
onEnter={(_itemId) => {
|
onEnter={(itemId) => {
|
||||||
if (showCreateButton) {
|
if (showCreateButton) {
|
||||||
onCreate?.();
|
onCreate?.();
|
||||||
} else {
|
} else {
|
||||||
const entity = entitiesInDropdown.findIndex(
|
const entity = entitiesInDropdown.findIndex(
|
||||||
(entity) => entity.id === _itemId,
|
(entity) => entity.id === itemId,
|
||||||
);
|
);
|
||||||
onEntitySelected(entitiesInDropdown[entity]);
|
onEntitySelected(entitiesInDropdown[entity]);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user