Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tabBarVisible does not affect nested StackNavigator inside TabNavigator #4350

Closed
jarvisluong opened this issue May 27, 2018 · 4 comments
Closed

Comments

@jarvisluong
Copy link

Current Behavior

  • I have a nested StackNavigator inside a createBottomTabNavigator with one nested screen inside the StackNavigator has navigationOptions that set tabBarVisible to false.

Expected Behavior

  • The nested screen inside StackNavigator that has tabBarVisible to false in navigationOptions should not show the tabBar

How to reproduce

Snack: https://snack.expo.io/HJrL-luy7

Your Environment

software version
react-navigation 2.0.4
expo 27.0.0
@itsmeek
Copy link

itsmeek commented May 28, 2018

@jarvisluong https://reactnavigation.org/docs/en/navigation-options-resolution.html#a-tab-navigator-contains-a-stack-and-you-want-to-hide-the-tab-bar-on-specific-screens

@jarvisluong
Copy link
Author

Could the behavior be the same as in v1? Since I have the setup that there are even nested StackNavigator inside another StackNavigator that using navigation.state.index itself can't fully solve the whole problem?

@brentvatne
Copy link
Member

the doc that @itsmeek linked to handles the exact problem that you describe. this is also listed as a breaking change in the release notes :)

@brentvatne
Copy link
Member

if you think the doc doesn't handle your use case then please comment on this thread with more information: react-navigation/rfcs#44

@react-navigation react-navigation locked and limited conversation to collaborators May 31, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants