The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
Fix : Small fixes for the options menu (#8983)
Suhotra Deyf4ef51fbe5c3
diff --git a/packages/twenty-front/src/modules/object-record/object-options-dropdown/components/ObjectOptionsDropdownMenuContent.tsx b/packages/twenty-front/src/modules/object-record/object-options-dropdown/components/ObjectOptionsDropdownMenuContent.tsxindex b9f2d078cf5..f4cfe784ff0 100644--- a/packages/twenty-front/src/modules/object-record/object-options-dropdown/components/ObjectOptionsDropdownMenuContent.tsx+++ b/packages/twenty-front/src/modules/object-record/object-options-dropdown/components/ObjectOptionsDropdownMenuContent.tsx@@ -8,6 +8,7 @@ import {IconRotate2,IconTag,MenuItem,+ useIcons,} from 'twenty-ui';import { useObjectNamePluralFromSingular } from '@/object-metadata/hooks/useObjectNamePluralFromSingular';@@ -27,6 +28,7 @@ import { DropdownMenuItemsContainer } from '@/ui/layout/dropdown/components/Dropimport { DropdownMenuSeparator } from '@/ui/layout/dropdown/components/DropdownMenuSeparator';import { useScopedHotkeys } from '@/ui/utilities/hotkey/hooks/useScopedHotkeys';import { useRecoilComponentValueV2 } from '@/ui/utilities/state/component-state/hooks/useRecoilComponentValueV2';+import { useGetCurrentView } from '@/views/hooks/useGetCurrentView';import { ViewType } from '@/views/types/ViewType';import { useIsFeatureEnabled } from '@/workspace/hooks/useIsFeatureEnabled';@@ -41,6 +43,12 @@ export const ObjectOptionsDropdownMenuContent = () => {const isViewGroupEnabled = useIsFeatureEnabled('IS_VIEW_GROUPS_ENABLED');+ const { getIcon } = useIcons();+ const { currentViewWithCombinedFiltersAndSorts: currentView } =+ useGetCurrentView();++ const CurrentViewIcon = currentView?.icon ? getIcon(currentView.icon) : null;+const { objectNamePlural } = useObjectNamePluralFromSingular({objectNameSingular: objectMetadataItem.nameSingular,});@@ -84,8 +92,8 @@ export const ObjectOptionsDropdownMenuContent = () => {return (<>- <DropdownMenuHeader StartIcon={IconList}>- {objectMetadataItem.labelPlural}+ <DropdownMenuHeader StartIcon={CurrentViewIcon ?? IconList}>+ {currentView?.name}</DropdownMenuHeader>{/** TODO: Should be removed when view settings contains more options */}{viewType === ViewType.Kanban && (