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

Anyone Working about Enable/Disable Swipe? #58

Open
Eumhongin opened this issue Jul 12, 2020 · 2 comments
Open

Anyone Working about Enable/Disable Swipe? #58

Eumhongin opened this issue Jul 12, 2020 · 2 comments

Comments

@Eumhongin
Copy link

i am using react-native-carousel inside react-native-swipe-gestures but... recognize duplicate in my view..

@stevesobol
Copy link

Please tell me if I'm not interpreting your problem correctly...

TL,DR: I'm not familiar with react-native-carousel, but I can offer this: make sure that the carousel component, or a parent component, isn't handling swipes itself.

Today, I'm working on an app that uses a Stack.Navigator. Specifically, I'm working on the main screen of the app, where you're supposed to swipe right to log out. Do that, and I put up a dialog asking for confirmation, and only navigate back to my app's login screen if you confirm that you want to log out.

I had it working, but if I swiped from the left edge of my phone's screen, it navigated back to the login screen without executing my "confirm that the user wants to log out" logic. So I set gestureEnabled to false on each of the screens handled by the navigator, and now my logic, and only my logic, processes swipes.

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

3 participants
@stevesobol @Eumhongin and others