Skip to content

Menu icon only works if navigation drawer component is the root element #480

Closed
@codyhazelwood

Description

@codyhazelwood

Version

  • react-native-router-flux v3.2.7
  • react-native v0.22.2, v0.23.0, v0.24.0-rc2
  • react-native-drawer v2.0.0

Expected behaviour

Creating a scene with a navigation drawer should create a hamburger icon for the menu.

Actual behaviour

A hamburger icon is only created if the menu is the root element.

Steps to reproduce

Working example:

<Router>
    <Scene key="main" component={NavigationDrawer} title="My Fancy App" type="replace">
        <Scene key="mainContainer">
            <Scene key="home" component={Home} />
            <Scene key="home2" component={Home2} />
        </Scene>
    </Scene>
</Router>

Non-working example (icon does not appear, but you can still swipe from the left to open the menu):

<Router>
    <Scene key="root>
        <Scene key="signIn" component={SignIn} type="replace" />
        <Scene key="main" component={NavigationDrawer} title="My Fancy App" type="replace">
            <Scene key="mainContainer">
                <Scene key="home" component={Home} />
                <Scene key="home2" component={Home2} />
            </Scene>
        </Scene>
    </Scene>
</Router>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions