The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
Switched current Sort Button with same used for filters and options ones (#5764)
RobertoSimonini1e478c68734cc
diff --git a/.gitignore b/.gitignoreindex 8cd3356e88a..376216c452c 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.jsondiff --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.tsxindex 0dd3ba29649..35869601c98 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={- <LightButton- title="Sort"- active={isSortSelected}+ <StyledHeaderDropdownButton+ isUnfolded={isDropdownOpen}onClick={handleButtonClick}- />+ >+ Sort+ </StyledHeaderDropdownButton>}dropdownComponents={<>