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

Avoid two nav bars when navigate from tabs Scene to another Scene #2694

Closed
ErickVoodoo opened this issue Dec 9, 2017 · 3 comments
Closed

Comments

@ErickVoodoo
Copy link

Version

  • react-native-router-flux v4.0.0-beta.24 (v3 is not supported)
  • react-native v0.50.4

Expected behaviour

The navigation bars do not stack

Actual behaviour

The navigation bars stacks

Steps to reproduce

So, guys I have this:

  <Router>
    <Modal>
      <Scene key="root">
        <Scene 
          tabs
          renderRightButton={} // NAVIGATE FROM THIS BUTTON TO settings
          hideNavBar
        >
          <Scene
            title='tab 1'
          >
            <Scene 
              title={'Остановки'}
              panHandlers={null}
              initial
            />
          </Scene>

          <Scene
            title='tab 2'
          >
            <Scene 
              panHandlers={null}
              initial
            />
          </Scene>
        </Scene>
        <Scene 
          key={'settings'}
          title={'Настройки'}
          // => HERE I HAVE TWO NAV BARS
        />
        <Scene 
          hideNavBar
        />
      </Scene>
      <Scene 
        hideNavBar={false}
      />
    </Modal>
  </Router>

rnrf-bug

As you see when I try to navigate from navBar right button to <Scene key={'settings'} /> I see two navBars, how to avoid this? I think I should change my route's structure. But I dont know how.

@samcole1992
Copy link

samcole1992 commented Dec 12, 2017

I also experienced this, add hideNavBar to root should fix the double nav bar

@samcole1992
Copy link

See also #2375

@aksonov
Copy link
Owner

aksonov commented Jan 4, 2018

You need to use hideNavBar to the root.

@aksonov aksonov closed this as completed Jan 4, 2018
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