-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Setting tab index other than 0. #1168
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. Can you provide a minimal repro which demonstrates the issue? Posting a snippet of your code in the issue is useful, but it's not usually straightforward to run. 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. The easiest way to provide a repro is on snack.expo.dev. If it's not possible to repro it on snack.expo.dev, then please provide the repro in a GitHub repository. |
Hi @Saad-Bashar ,
hope this helps. |
Hey @khanhtn91 , thanks for your comment! In my use case, it was a bit different. Not I am setting the index and while setting it I am not showing the tab bar. something like this
Am I making it way too complicated? |
Hello 👋, this issue has been open for more than a month without a repro or any activity. If the issue is still present in the latest version, please provide a repro or leave a comment within 7 days to keep it open, otherwise it will be closed automatically. If you found a solution or workaround for the issue, please comment here for others to find. If this issue is critical for you, please consider sending a pull request to fix it. |
useEffect is unneeded, just calling setIndex() in the function is better. |
same issue,could you please tell me how to solve it? |
I want to set the default active tab index to 1. I am using setIndex to change the index value to 1 from 0. But it does not change the tab whereas a hard refresh on the simulator works. Not sure where I am going wrong with this. All the components are declared outside of my component. Any suggestion on this, please? Maybe I am doing something very silly.
My tabview version is ---- "react-native-tab-view": "^2.15.2",
Here even the index is 1 when I console.log(index). But the tab is not moving.
Like in the image, the active indicator is at new whereas it should be on accepted.
The text was updated successfully, but these errors were encountered: