1

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
Narayana Dvl
  • 211
  • 1
  • 5
  • 12

2 Answers2

0

You can achieve it by setting the following configuration,

Navigation.push(this.props.componentId, {
  component: {
    name: screen,
    options: {sideMenu: {left: {enabled: false}}},
  },
});
Alish Giri
  • 1,855
  • 18
  • 21
-1

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

Hisham Mubarak
  • 1,559
  • 3
  • 22
  • 28