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

DrawerNavigator does not work, if it contains a TabNavigator containing a Stacknavigator #3954

Closed
janrop opened this issue Apr 11, 2018 · 7 comments

Comments

@janrop
Copy link

commented Apr 11, 2018

Current Behavior

https://snack.expo.io/@janrop/drawernavigator-test

Navigating with the DrawerNavigator does not work if there is a TabNavigator which itself contains a StackNavigator

  • Drawer Navigator
    • TabNavigator
      • Stacknavigator
        • Screen
      • Screen
      • Screen
    • Screen

Expected Behavior

  • Navigation should work as expected

How to reproduce

https://snack.expo.io/@janrop/drawernavigator-test

  • Go to the second or third tab
  • Open the Drawer
  • Go To "InDrawer"
  • Open the Drawer
  • Try to return to "Tabs"

Your Environment

software version
react-navigation 1.5.11
expo sdk 26.0.0
@kosmicbird

This comment has been minimized.

Copy link

commented Apr 20, 2018

+1

I have a very similar navigation system and am experiencing the same issue. It happens to me regardless of which navigators are nested (StackNav within TabNav, TabNav within TabNav, etc)

@brentvatne

This comment has been minimized.

Copy link
Member

commented May 7, 2018

thanks for this repro. confirmed that the bug still exists on 2.0: https://snack.expo.io/HyN2JvC6M

@kosmicbird

This comment has been minimized.

Copy link

commented May 14, 2018

Any updates on when this will be fixed or a workaround for the issue?

@ericvicenti

This comment has been minimized.

Copy link
Contributor

commented May 15, 2018

Just fixed it here: #4237

In the mean time you can make this change yourself, or use a custom drawer contentComponent that just does a normal props.navigation.navigate() when a link is pressed.

@kosmicbird

This comment has been minimized.

Copy link

commented May 15, 2018

Oh cool! Great news to wake up to ^_^ I will implement this in my app. Thanks!

@brentvatne brentvatne closed this Jun 28, 2018

@brentvatne

This comment has been minimized.

Copy link
Member

commented Jun 28, 2018

we still need to remove the StackActions.reset() thing from drawer, issue lives on at react-navigation/drawer#2

@seanmorton

This comment has been minimized.

Copy link

commented Aug 1, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.