Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to disable swipe to back #2269

Closed
romk1n opened this issue Aug 20, 2017 · 14 comments
Closed

How to disable swipe to back #2269

romk1n opened this issue Aug 20, 2017 · 14 comments

Comments

@romk1n
Copy link

romk1n commented Aug 20, 2017

Version

Tell us which versions you are using:

  • react-native-router-flux v4.0.0-beta.18
  • react-native v0.47.1

Expected behaviour

swipe to back not popping the scene

Actual behaviour

Swiping to the right (standard swipe back behaviour) popping the scene with no back button

Steps to reproduce

For non-obvious bugs, please fork this component, modify Example project to reproduce your issue and include link here.

  1. create two scenes, i.e. Auth and Main
  2. define Login sceme in Auth and Home in Main
  3. perform login action which executed Main action.
  4. swipe back from Main gets you to the Login screen.
@aksonov
Copy link
Owner

aksonov commented Aug 21, 2017

Use gesturesEnabled={false} or panHandlers={null}

@aksonov aksonov closed this as completed Aug 21, 2017
@romk1n
Copy link
Author

romk1n commented Aug 21, 2017

@aksonov thanks, is there a place for all of the props ? it seems in the example you using it in Tabs, but it would work in scene as well?

@mkayswork
Copy link

@aksonov gestureEnabled is not working but panHandlers is (using version 4.0.0-beta.21). What's the difference between those props???

@lpetkovic
Copy link

@mkayswork I believe that is because gestureEnabled is a typo :)
It should be gesturesEnabled (plural)

@iKronyck
Copy link

Hi, how could I disable the virtual button to go back android, any ideas?

@Blapi
Copy link
Collaborator

Blapi commented Feb 26, 2018

@iKronyck What do you mean by "virtual button" on Android ?

@dancham86
Copy link

@iKronyck Do you mean the hardware back button? You need to implement the BackHandler

@iKronyck
Copy link

Thanks!! I'll read about that

@mrded
Copy link

mrded commented Mar 28, 2018

Just curious, why is gesturesEnabled and panHandlers are not documented?

@asatour
Copy link

asatour commented Sep 3, 2018

Try swipeEnabled={false}

@chenyu1990
Copy link

Use gesturesEnabled={false} or panHandlers={null}

its save me, thanks u.

@chenyu1990
Copy link

Try swipeEnabled={false}

its not working.

@VB10
Copy link
Contributor

VB10 commented Nov 17, 2018

Just curious, why is gesturesEnabled and panHandlers are not documented?

++++

@ashishlamse
Copy link

ashishlamse commented Jun 14, 2019

whenever you are moving one scene to another and you want to disable swipe for current scene.Then use Actions.replace('next-scene'); instead of Actions.push('next-scene'); or Actions.next-scene().

I resolve my problem by doing this.

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

No branches or pull requests