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

Feature Request - onSwipeBegin #73

Open
iway1 opened this issue Dec 23, 2021 · 1 comment
Open

Feature Request - onSwipeBegin #73

iway1 opened this issue Dec 23, 2021 · 1 comment

Comments

@iway1
Copy link

iway1 commented Dec 23, 2021

Right now, this component only supports running code when a swipe finishes. It'd be really nice if there was a way to trigger when a swipe begins.

@GaraGentor
Copy link

You can simply extend this package by yourself for your use case and save the changes with patch-package until this is updated.

I added a move callback to make some nice animations where my view moves into the same direction the swipe is going.

For you it should be something like that if this helps you:

Add the following in the index.js of react-native-swipe-gestures (see image 1 marked positions) now you can simply add a callback to the GestureRecognizer component which will execute a method from your component. "swipebegincallback" is the callback prop where you should pass in your method. I think this is a fast solution for you, maybe this helps.
Bildschirmfoto 2021-12-24 um 22 19 43

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

2 participants