FlashList scrolling stealing Pan Gesture? #3395
Unanswered
rohit-mondal-17
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have an Animated Flashlist created using Reanimated:-
The
renderItemof this Flashlist contains 5 views in a row. Among those, two views are supposed to be draggable. It looks mostly like this:-There are about 70 elements in the Flashlist.
Now, each draggable view is wrapped with a
GestureDetectortaken fromreact-native-gesture-handlerWhat is the dragGesture assigned to it?
Each DraggableView is wrapped with its own instance of Gesture.Pan()
That's because each view should be draggable on its own.
The
GestureHandlerRootViewhas been wrapped over the entire app.What is the issue that I am facing?
How am I auto scrolling?
My dragGesture looks mostly like this and I am updating the dragY value in onUpdate. dragY is a shared value. I am keeping all calculations on UI thread
When scrolling starts, after sometime, onEnd never gets called. It seems like scrolling steals the PanGesture. None of the
onTouchesCancelledoronFinalizealso gets called.I have updated the Flashlist to be like RNGH flatlist in the following manner:-
Versions used:-
I am doing all this on iOS
Please help here. I am unable to understand why pan gesture is lost and none of the termination functions on it are called.
Beta Was this translation helpful? Give feedback.
All reactions