-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Tab bar does not show correct tab after being unmounted and remounted #1234
Comments
Couldn't find version numbers for the following packages in the issue:
Can you update the issue to include version numbers for those packages? The version numbers must match the format 1.2.3. |
Hey! Thanks for opening the issue. The issue doesn't seem to contain a link to a repro (a snack.expo.dev link or link to a GitHub repo under your username). Can you provide a minimal repro which demonstrates the issue? A repro will help us debug the issue faster. Please try to keep the repro as small as possible and make sure that we can run it without additional setup. |
would be good to allow org repos as well as personal ones |
Having the same problem. I am using the tab view in a modal. When re-opening the modal, the initial index is wrong (not always, but often). |
facing a similar issue only on android. Any solution |
Same problem here |
Facing the same issue. After changing to a different tab e.g. index 3, unmounting, and resetting navigationState index back to 0, the newly mounted Tabbar displays the tab on index 3 as selected rather than 0. |
When I unmounted the TabBar I originally rendered a SkeletonPlaceholder instead of it and that seems to be the problem. I have a CustomTabBar component, which I pass to renderTabBar in TabView, and in that component a conditionally swap the 2 TabBars and it seems to work. |
Current behavior
tabbug_converted.mov
If you return a null in renderTabBar and then later start returning the tab bar component again it renders with the wrong tab selected
Expected behavior
The tab bar should always render with the correct tab selected
Reproduction
https://github.com/saty9/react-native-tab-view-issue-reproduction
Platform
Environment
The text was updated successfully, but these errors were encountered: