diff --git a/packages/twenty-front/src/modules/command-menu/pages/navigation-menu-item/components/CommandMenuSystemObjectPickerSubView.tsx b/packages/twenty-front/src/modules/command-menu/pages/navigation-menu-item/components/CommandMenuSystemObjectPickerSubView.tsx index 8f7d5028579..0a3a44ca8cd 100644 --- a/packages/twenty-front/src/modules/command-menu/pages/navigation-menu-item/components/CommandMenuSystemObjectPickerSubView.tsx +++ b/packages/twenty-front/src/modules/command-menu/pages/navigation-menu-item/components/CommandMenuSystemObjectPickerSubView.tsx @@ -1,10 +1,12 @@ import { useLingui } from '@lingui/react/macro'; import { CommandGroup } from '@/command-menu/components/CommandGroup'; +import { CommandMenuAddToNavDroppable } from '@/command-menu/components/CommandMenuAddToNavDroppable'; import { CommandMenuList } from '@/command-menu/components/CommandMenuList'; import { CommandMenuObjectPickerItem } from '@/command-menu/pages/navigation-menu-item/components/CommandMenuObjectPickerItem'; import { CommandMenuSubViewWithSearch } from '@/command-menu/components/CommandMenuSubViewWithSearch'; import { useFilteredPickerItems } from '@/command-menu/hooks/useFilteredPickerItems'; +import { ADD_TO_NAV_SOURCE_DROPPABLE_ID } from '@/navigation-menu-item/constants/AddToNavSourceDroppableId'; import { type ObjectMetadataItem } from '@/object-metadata/types/ObjectMetadataItem'; type CommandMenuSystemObjectPickerSubViewProps = { @@ -45,6 +47,24 @@ export const CommandMenuSystemObjectPickerSubView = ({ ? t`No results found` : (emptyNoResultsText ?? t`No system objects available`); + const isAddVariant = objectMenuItemVariant === 'add'; + + const listContent = ( + + {filteredItems.map((objectMetadataItem, index) => ( + + ))} + + ); + return ( - - - {filteredItems.map((objectMetadataItem) => ( - - ))} - - + {isAddVariant ? ( + + {({ innerRef, droppableProps, placeholder }) => ( + +
+ {listContent} + {placeholder} +
+
+ )} +
+ ) : ( + + {listContent} + + )}
); };