chakra-ui / ark

Ark UI is a headless UI library with over 45+ components designed to build scalable Design Systems that works for a wide range of JS frameworks.
https://ark-ui.com
MIT License
3.8k stars 109 forks source link

Component Tabs bugs with controlled mode on first change #3065

Open PlayeurZero opened 3 days ago

PlayeurZero commented 3 days ago

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

Additional Information

Initial render is ok :

image

Click on "Second tab" (text has disappeared)

image

segunadebayo commented 2 days ago

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