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

On hiding child nav bar, parent nav bar gets hidden #2200

Closed
rupalpatel0008 opened this issue Aug 8, 2017 · 3 comments
Closed

On hiding child nav bar, parent nav bar gets hidden #2200

rupalpatel0008 opened this issue Aug 8, 2017 · 3 comments

Comments

@rupalpatel0008
Copy link

rupalpatel0008 commented Aug 8, 2017

Version

  • react-native-router-flux v4.0.0-beta.15
  • react-native v0.45.1

Expected behaviour

I want to hide nav bar of nested tab bars in my app. When I put hideNavbar prop in my scene defination of a nested tab bar view, it should hide the nav bar of that view only.

Actual behaviour

Instead its hiding all nav bars in app.

Steps to reproduce

See the screenshot. http://prntscr.com/g5spnf

The red one is title bar of parent tab bar. The yellow one is nested tab bar. And the green one is nav bar of the nested tab bar. I want to hide the green nav bar.

I have put hideNavbar for green nav bar as following.

<Scene
  key="favourites"
  title="SAVED"
  tabs
  tabBarPosition='top'
  showLabel={true}
  showIcon={false}
  lazyLoad={false}
  swipeEnabled={true}
  activeTintColor='black'
  activeBackgroundColor='transparent'
  activeTintColor='white'
  indicatorStyle={{backgroundColor:'#1DC43C'}}
  renderRightButton={() => <Text>add</Text>}
>
  <Scene
    key="favourites_saved_all"
    title="All"
    component={FavouritesSavedAll}
    iconName="activityTab"
    hideNavBar
  />
  <Scene
    key="favourites_saved_groups"
    title="Groups"
    component={FavouritesSavedGroups}
    iconName="activityTab"
    initial
    hideNavBar
  />
</Scene>

This is the current output:
http://prntscr.com/g5svuu

@aksonov
Copy link
Owner

aksonov commented Aug 8, 2017

It looks react-navigation issue. Please check pure react-navigation demos - once you set header to null within navigationOptions it will hide all navbars. Related:
react-navigation/react-navigation#88

@aksonov
Copy link
Owner

aksonov commented Aug 10, 2017

Closed because it is not supported right now. Feel free to submit PR or open issue for react-navigation about this.

@aksonov aksonov closed this as completed Aug 10, 2017
@wluxion
Copy link

wluxion commented Oct 31, 2017

For others looking at this: you may be able to achieve what you want with headerMode (none/float).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants