Skip to content
This repository has been archived by the owner on Feb 15, 2019. It is now read-only.

Temporarily disable gestures? #422

Open
joeferraro opened this issue Mar 2, 2017 · 3 comments
Open

Temporarily disable gestures? #422

joeferraro opened this issue Mar 2, 2017 · 3 comments

Comments

@joeferraro
Copy link
Contributor

I have a modal with a PanResponder and horizontal swipes are being picked up by the underlying navigation stack. Is it possible to temporarily disable navigation gestures? Cheers

@JulianKingman
Copy link

One option would be to push a view instead of using a modal, then use styles: {gestures: null} in the static route property. If you want it to slide up like a modal, you can use it like this:

static route = {
    navigationBar: {
      // ...
    },
    styles: {
      ...NavigationStyles.FloatVertical,
      gestures: null,
    },
  };

@joeferraro
Copy link
Contributor Author

@JulianKingman appreciate it. I was trying to avoid pushing a route.

@JulianKingman
Copy link

It's the simplest way, but if you're set against it, you could maybe use the navigation event emitters and set the gestures based on the emitted params, but I'm not 100% sure that will work.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants