You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I encountered an issue with the ShadCN Tab component where switching between tabs clears both component state and Redux state. This occurs because the inactive tab content appears to be unmounted when switching tabs.
The text was updated successfully, but these errors were encountered:
This is expected behavior Radix Tabs only mount the active content container. When a React component unmounts, its internal state is lost.
Could it be that your Redux provider is mounted inside Tabs.Content instead of at the root of your app? That would explain why the store is being cleared.
You could try force-mounting the Tabs.Content and conditionally applying display: none. That way, the content stays in the DOM but remains hidden when needed.
You could try force-mounting the Tabs.Content and conditionally applying display: none. That way, the content stays in the DOM but remains hidden when needed.
Thank you. I also found a solution that can be achieved.
I encountered an issue with the ShadCN Tab component where switching between tabs clears both component state and Redux state. This occurs because the inactive tab content appears to be unmounted when switching tabs.
The text was updated successfully, but these errors were encountered: