React-native-navigation: Open Drawer from custom navbar

Created on 29 Apr 2017  ·  3Comments  ·  Source: wix/react-native-navigation

Is it possible to open Drawer by clicking a button when navbar is hidden (e.g from custom navbar)?
Swiping from edge screen seems to work fine but not by clicking a custom hamburger button on top of custom navbar.

All 3 comments

<Button
    title="Open Drawer"
    onPress={() => this.props.navigator.toggleDrawer({
        side: 'left',
        animated: true
    })}
/>

What happens if I want tu use:
<NavigationBar.DrawerButton onPress={this.() => { this.props.navigator.toggleDrawer({ screen: 'com.vivi.DrawerMenuScreen', animated: true, side: 'left', backButtonHidden: false })} /> ??? doesn't work, what can I do?

@anhtuank7c but why when I call the 'toggleDrawer' from "setOnNavigatorEvent" there is no effect?

Was this page helpful?
0 / 5 - 0 ratings