1
votes

How to disable sideMenu on current window even user swipe right or left on the screen

Environment

  • React Native Navigation version: 2.0.2106
  • React Native version: 0.52.2
  • Platform(s) (iOS, Android, or both?): both
  • Device info (Simulator/Device? OS version? Debug/Release?): all
2

2 Answers

0
votes

You can achieve it by setting the following configuration,

Navigation.push(this.props.componentId, {
  component: {
    name: screen,
    options: {sideMenu: {left: {enabled: false}}},
  },
});
-1
votes

Try setting navigationOptions of that page by adding the following code to the Component code.

static navigationOptions = {
  drawerLockMode: 'locked-closed'
}

More detailed explanation can be found in the below linked SO answer https://stackoverflow.com/a/45160191/6435908