fix(graph): fix toggle click and multiple dropdown issues#16874
Merged
charlesBochet merged 3 commits intotwentyhq:mainfrom Jan 8, 2026
Merged
fix(graph): fix toggle click and multiple dropdown issues#16874charlesBochet merged 3 commits intotwentyhq:mainfrom
charlesBochet merged 3 commits intotwentyhq:mainfrom
Conversation
- Close any open dropdown before opening a new one in graph settings - Fix MenuItemToggle nested label issue that prevented toggle clicks
Contributor
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
Contributor
|
🚀 Preview Environment Ready! Your preview environment is available at: http://bore.pub:21040 This environment will automatically shut down when the PR is closed or after 5 hours. |
Closed
charlesBochet
approved these changes
Jan 8, 2026
Member
|
Thank you! |
packages/twenty-ui/src/navigation/menu/menu-item/components/MenuItemToggle.tsx
Show resolved
Hide resolved
|
Hey @charlesBochet! After you've done the QA of your Pull Request, you can mark it as done here. Thank you! |
1 similar comment
|
Hey @charlesBochet! After you've done the QA of your Pull Request, you can mark it as done here. Thank you! |
NotYen
pushed a commit
to NotYen/twenty-ym
that referenced
this pull request
Jan 30, 2026
…Save 按鈕 dirty state (twentyhq#16864)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #16843
Summary
This PR fixes two bugs in graph settings:
Fix 1: Multiple dropdowns
File: ChartSettingItem.tsx
Added
closeAnyOpenDropdown()before opening a new dropdown. This follows the existing pattern used in:Fix 2: Toggle switches not clickable
File: MenuItemToggle.tsx (twenty-ui)
Investigation
I traced the toggle click flow and compared working vs non-working usages:
The component structure and props were identical, so I examined the HTML output.
Root Cause
Found nested
<label>elements:While
htmlFortheoretically links to the checkbox, nested labels are invalid HTML and can cause click propagation issues in certain browser contexts (particularly when combined with React event handling andSelectableListkeyboard navigation).Solution
Changed
StyledToggleContainerfromlabeltodiv:The Toggle component already handles clicks via its internal label wrapper, so the outer label was redundant.
Also removed unused
useId,htmlFor, andidprops that were only needed for the label association.Testing
twenty-uitwenty-front