Open
Conversation
Collaborator
fermarinsanchez
commented
Jun 18, 2025
- Extract the state outside TabGroup component
- Remove tabIndex from unnecessary element
- Update storybook TabGroup
jgonzmoya
reviewed
Jun 18, 2025
src/tabGroup/TabGroup.tsx
Outdated
| return false; | ||
| }; | ||
|
|
||
| useImperativeHandle(ref, () => ({ |
Collaborator
There was a problem hiding this comment.
this code seem a workaround for internar state issue if we became the compoenent to state less(better option for me) we can remove the useImperativeRef and effect with forceOnselect callback. @daniele-zurico what do you think about this?? also the imperativeRef feature is undocumented and untyped. This make a breaking change but I see it as necessary.
src/tabGroup/TabGroup.tsx
Outdated
|
|
||
| const onClickHandler: (id: string) => void = (id: string) => | ||
| updateActiveTab(id); | ||
| const onClickHandler: (id: string) => void = (id: string) => { |
Collaborator
There was a problem hiding this comment.
I launch another strange situation, the keyboard handler does a preventDefualt but the click handler doesn't. @daniele-zurico Do you know if it's for a specific reason? because it causes refresh of the default application on click.

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.