Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Component Tabs bugs with controlled mode on first change #3065

Open
1 of 3 tasks
PlayeurZero opened this issue Nov 19, 2024 · 2 comments · May be fixed by #3081
Open
1 of 3 tasks

Component Tabs bugs with controlled mode on first change #3065

PlayeurZero opened this issue Nov 19, 2024 · 2 comments · May be fixed by #3081
Labels

Comments

@PlayeurZero
Copy link

Description

When I create a controlled tabs, during the first onValueChange call, I do not change the index and the Tabs.Content unmounts when it shouldn't.

Link to Reproduction

https://stackblitz.com/edit/chakra-ui-v3-o9atp5?file=src%2FApp.tsx

Steps to reproduce

  1. Click on "Second tab"
  2. The text "First panel" disappears when it shouldn't

Chakra UI Version

3.1.2

Browser

Firefox 132.0.2 (latest), Chromium 130.0.6723.116

Operating System

  • macOS
  • Windows
  • Linux

Additional Information

Initial render is ok :

image

Click on "Second tab" (text has disappeared)

image

@segunadebayo segunadebayo transferred this issue from chakra-ui/chakra-ui Nov 19, 2024
@segunadebayo
Copy link
Member

@PlayeurZero I transferred the issue to Ark where the underlying issue lives.

@cschroeter cschroeter added the bug label Nov 22, 2024
@cschroeter
Copy link
Member

@segunadebayo

I debugged this a bit and machines returns the value for the second tab, and immediately the value for the first. That should not be the case. What your thoughts?

@cschroeter cschroeter linked a pull request Nov 26, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants