Repository navigation
Conversation
Bundle size reportTotal Size Change: 🔺+1.08KB(+0.08%) - Total Gzip Change: 🔺+502B(+0.10%) Show details for 69 more bundles@base-ui-components/react/tabs parsed: 🔺+338B(+1.29%) gzip: 🔺+138B(+1.47%) |
✅ Deploy Preview for base-ui ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Co-authored-by: mnajdova <[email protected]>
Co-authored-by: mnajdova <[email protected]>
|
@copilot check if this can be generalized inside |
…sList Co-authored-by: atomiks <[email protected]>
I've generalized this logic in
The tabs-specific value selection logic remains in Commit: 972495f |
…ot effect Co-authored-by: atomiks <[email protected]>
Co-authored-by: atomiks <[email protected]>
Co-authored-by: atomiks <[email protected]>
commit: |
mnajdova
left a comment
There was a problem hiding this comment.
I'm approving, but also I did most of the changes, so would be great to have at least another review 😄
|
Not sure if related but in the experiment the panel isn't visible during server pre-rendering, only appearing after hydration |
Yeah, I just noticed the same, from what I understand it's because we are depending on the tab map to be available for the detection of the disabled state, we will likely need to change the logic in order to fix this, so we depend on props only, and not on the underlaying elements. I may be missing something though. |
|
Implemented in #3475 |
Fixes #2098 by enhancing the composite system to automatically skip disabled items and improving tab selection behavior.
Previously, when no explicit
valueordefaultValuewas provided toTabs.Root, the component would always select the first tab (index 0) by default, even if that tab was disabled. Additionally, the composite system used by tabs and other components would default to highlighting the first item (index 0) for keyboard navigation, even if disabled.The fix introduces a generalized approach that benefits all composite-based components, but only if they set a new flag available:
ignoreDisabledItemsOnInitialHiglighting, so that we don't break previous behavior that makes sense for components like menus for example:Experiment link: https://deploy-preview-2579--base-ui.netlify.app/experiments/disabled-tabs