hideTabBar is broken when used in nested stacks/scenes
See original GitHub issueVersion
Tell us which versions you are using:
- react-native-router-flux v4.0.2 (latest master)
- react-native v0.56.0 (Example App)
Expected behaviour
hideTabBar on any Scene hides TabBar when that Scene is presented (as previously)
Actual behaviour
TabBar keeps on showing
Steps to reproduce
Slightly modified the Example app, added tabs
to the root Stack, and added hideTabBar
to the register Scenes, I have the same structure in my app. Previously using 4.0.0-beta.28, TabBar was hidden when the Scene with hideTabBar
got presented, now it isn’t.
<Stack hideNavBar tabs key="root" titleStyle={{ alignSelf: 'center' }}>
<Scene key="echo" back clone component={EchoView} getTitle={({ navigation }) => navigation.state.key} />
<Scene key="launch" component={Launch} title="Launch" initial />
<Stack key="customNavBar" hideTabBar titleStyle={{ alignSelf: 'center' }}>
<Scene key="customNavBar1" title="CustomNavBar 1" navBar={CustomNavBar} component={CustomNavBarView} back />
<Scene key="customNavBar2" title="CustomNavBar 2" navBar={CustomNavBar} component={CustomNavBarView} back />
<Scene key="customNavBar3" title="Another CustomNavBar" navBar={CustomNavBar2} component={CustomNavBarView} back />
<Scene key="hiddenNavBar" title="hiddenNavBar" component={CustomNavBarView} hideNavBar={true} back />
</Stack>
<Stack back backTitle="Back" key="register" duration={0} navTransparent>
<Scene key="_register" hideTabBar component={Register} title="Register" />
<Scene key="register2" hideTabBar component={Register} title="Register2" />
<Scene key="home" component={Home} title="Replace" type={ActionConst.REPLACE} />
</Stack>
Issue Analytics
- State:
- Created 5 years ago
- Reactions:5
- Comments:16 (1 by maintainers)
Top Results From Across the Web
How can I selectively hide Tabs with nested StackNavigators ...
In order to hide a tabBar on one of the tabs, you can set this option to true. It's been recently documented. Is...
Read more >SwiftUI hide TabBar in subview - Stack Overflow
Traverse the allsubview of the window to hide the UITabBar. You can write it as ViewModifier and use it in SwiftUI or use...
Read more >Hiding tab bar in specific screens - React Navigation
Sometimes we may want to hide the tab bar in specific screens in a stack navigator nested in a tab navigator. Let's say...
Read more >How to hide the tab bar when a view controller is shown
If you don't want that behavior, you should set hidesBottomBarWhenPushed to true where applicable. This will hide the tab bar along with any ......
Read more >Scene view navigation - Unity - Manual
Flythrough mode; Camera speed; Movement shortcuts. Arrow movement. You can use the Arrow Keys to move around the Scene as though “walking” through ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
That is working in the
Example
code with the most recent version.Please, take a look there, and in case you found a bug, or was able to reproduce this there, reopen this ticket with the failing example.
I still got the problem. I tried your solution @daviscabral but it didn’t work in my case. I’ll try to investigate in the next few days, starting by your updated example.
Thank you for your time 😃