From b27f2ca1465209b27f078a83973774c0ecd1d87f Mon Sep 17 00:00:00 2001 From: Aditya Cherukuru <145639927+aditya-cherukuru@users.noreply.github.com> Date: Thu, 8 Jan 2026 17:35:32 +0530 Subject: [PATCH] fix(graph): fix toggle click and multiple dropdown issues (#16874) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #16843 ## Summary This PR fixes two bugs in graph settings: 1. **Multiple dropdowns opening simultaneously** 2. **Toggle switches not clickable** --- ## Fix 1: Multiple dropdowns **File:** [ChartSettingItem.tsx](https://github.com/twentyhq/twenty/blob/main/packages/twenty-front/src/modules/command-menu/pages/page-layout/components/chart-settings/ChartSettingItem.tsx) Added `closeAnyOpenDropdown()` before opening a new dropdown. This follows the existing pattern used in: - [useCommandMenu.ts](https://github.com/twentyhq/twenty/blob/main/packages/twenty-front/src/modules/command-menu/hooks/useCommandMenu.ts) - [RecordBoardDragSelect.tsx](https://github.com/twentyhq/twenty/blob/main/packages/twenty-front/src/modules/object-record/record-board/components/RecordBoardDragSelect.tsx) - [useRecordGroupReorderConfirmationModal.ts](https://github.com/twentyhq/twenty/blob/main/packages/twenty-front/src/modules/object-record/record-group/hooks/useRecordGroupReorderConfirmationModal.ts) --- ## Fix 2: Toggle switches not clickable **File:** [MenuItemToggle.tsx](https://github.com/twentyhq/twenty/blob/main/packages/twenty-ui/src/navigation/menu/menu-item/components/MenuItemToggle.tsx) (twenty-ui) ### Investigation I traced the toggle click flow and compared working vs non-working usages: - ✅ [SettingsRolesList.tsx](https://github.com/twentyhq/twenty/blob/main/packages/twenty-front/src/modules/settings/roles/components/SettingsRolesList.tsx) - toggles work (MenuItemToggle directly in Dropdown) - ✅ [ObjectOptionsDropdownRecordGroupsContent.tsx](https://github.com/twentyhq/twenty/blob/main/packages/twenty-front/src/modules/object-record/object-options-dropdown/components/ObjectOptionsDropdownRecordGroupsContent.tsx) - toggles work (MenuItemToggle in SelectableListItem) - ❌ [ChartSettingItem.tsx](https://github.com/twentyhq/twenty/blob/main/packages/twenty-front/src/modules/command-menu/pages/page-layout/components/chart-settings/ChartSettingItem.tsx) - toggles don't work (CommandMenuItemToggle in SelectableListItem) The component structure and props were identical, so I examined the HTML output. ### Root Cause Found **nested `