diff --git a/.gitignore b/.gitignore index 8cd3356e8..376216c45 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ .DS_Store /.idea **/**/node_modules/ +.cache # yarn is the recommended package manager across the project **/**/.package-lock.json diff --git a/packages/twenty-front/src/modules/object-record/object-sort-dropdown/components/ObjectSortDropdownButton.tsx b/packages/twenty-front/src/modules/object-record/object-sort-dropdown/components/ObjectSortDropdownButton.tsx index 0dd3ba296..35869601c 100644 --- a/packages/twenty-front/src/modules/object-record/object-sort-dropdown/components/ObjectSortDropdownButton.tsx +++ b/packages/twenty-front/src/modules/object-record/object-sort-dropdown/components/ObjectSortDropdownButton.tsx @@ -5,10 +5,11 @@ import { IconChevronDown, useIcons } from 'twenty-ui'; import { OBJECT_SORT_DROPDOWN_ID } from '@/object-record/object-sort-dropdown/constants/ObjectSortDropdownId'; import { useObjectSortDropdown } from '@/object-record/object-sort-dropdown/hooks/useObjectSortDropdown'; import { ObjectSortDropdownScope } from '@/object-record/object-sort-dropdown/scopes/ObjectSortDropdownScope'; -import { LightButton } from '@/ui/input/button/components/LightButton'; import { Dropdown } from '@/ui/layout/dropdown/components/Dropdown'; import { DropdownMenuHeader } from '@/ui/layout/dropdown/components/DropdownMenuHeader'; import { DropdownMenuItemsContainer } from '@/ui/layout/dropdown/components/DropdownMenuItemsContainer'; +import { StyledHeaderDropdownButton } from '@/ui/layout/dropdown/components/StyledHeaderDropdownButton'; +import { useDropdown } from '@/ui/layout/dropdown/hooks/useDropdown'; import { MenuItem } from '@/ui/navigation/menu-item/components/MenuItem'; import { HotkeyScope } from '@/ui/utilities/hotkey/types/HotkeyScope'; @@ -54,7 +55,6 @@ export const ObjectSortDropdownButton = ({ setSelectedSortDirection, toggleSortDropdown, resetState, - isSortSelected, availableSortDefinitions, handleAddSort, objectSortDropdownSearchInputState, @@ -62,6 +62,8 @@ export const ObjectSortDropdownButton = ({ resetSearchInput, } = useObjectSortDropdown(); + const { isDropdownOpen } = useDropdown(OBJECT_SORT_DROPDOWN_ID); + const handleButtonClick = () => { toggleSortDropdown(); }; @@ -84,11 +86,12 @@ export const ObjectSortDropdownButton = ({ dropdownHotkeyScope={hotkeyScope} dropdownOffset={{ y: 8 }} clickableComponent={ - + > + Sort + } dropdownComponents={ <>