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

Strange behavior for drawerOpen #2058

Closed
soulwu opened this issue Jul 18, 2017 · 5 comments
Closed

Strange behavior for drawerOpen #2058

soulwu opened this issue Jul 18, 2017 · 5 comments

Comments

@soulwu
Copy link
Contributor

soulwu commented Jul 18, 2017

I put a scene with drawer under scene with tabs. But after drag open the drawer and close it, a new screen of the drawer's children was pushed in by mistake.

my Router and Scene config like below

<Router createReducer={reducerCreator}>
  <Scene key="lightbox" lightbox>
    <Scene key="modal" modal>
      <Scene key="root" hideNavBar>
        <Scene key="detail" back title="FundDetail">
          <Scene key="_detail" component={DetailScreen} />
        </Scene>
        <Scene key="welcome" component={WelcomeScreen} initial />
        <Scene key="tabbar" tabs hideNavBar gesturesEnabled={false}>
          <Scene key="profile" component={ProfileScreen} hideNavBar />
          <Scene key="home" drawer contentComponent={LeftDrawer} hideNavBar>
            <Scene key="_home" component={HomeScreen} hideNavBar />
          </Scene>
        </Scene>
      </Scene>
      <Scene key="login" component={LoginScreen} title="login" leftTitle="cancel" onLeft={Actions.pop} />
    </Scene>
  </Scene>
</Router>

drawer

@soulwu
Copy link
Contributor Author

soulwu commented Jul 18, 2017

I print the state diff in reducer, I think the problem could be the second DrawerOpen action, also maybe a bug for react-navigation?
image

@aksonov
Copy link
Owner

aksonov commented Jul 18, 2017

Drawer should be parent for tabs, check Example project.

@soulwu
Copy link
Contributor Author

soulwu commented Jul 18, 2017

@aksonov Drawer must be parent for tabs? But how can I make Drawer only enabled while user switch to Home tab?

@aksonov
Copy link
Owner

aksonov commented Jul 18, 2017

Maybe it is issue of ReactNavigation. Please create pure React Navigation project and check. Also you may try to reproduce the issue with Example project from this component.

@aksonov
Copy link
Owner

aksonov commented Jul 25, 2017

Closing it because didn't receive cloned and modified Example to reproduce.

@aksonov aksonov closed this as completed Jul 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants