Disable Flatlist scrolling when GestureHandler interacting? #1667
Unanswered
CallumHemsley
asked this question in
Q&A
Replies: 2 comments 2 replies
-
you may use the ref to disable scrolling. add ref to the scrollable component. vref.current && vref.current.setNativeProps({scrollEnabled: false/true }) |
Beta Was this translation helpful? Give feedback.
1 reply
-
Any success? Because I also trying to achieve animation like that #2316 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, I'm currently trying to wrap a
PanGestureHandler
around a react-native flatlist.I've got the pangesture to work with the flatlist by giving simultaneous handlers and wrapping the flatlist with a
NativeViewGestureHandler
.However the scrolling is still enabled on the FlatList. I've also tried giving the NativeViewGestureHandler a
waitFor
which works until the FlatList re-renders, afterwards not working as expected.I've also tried giving the Flatlist a
useState
boolean variable to enable/disable the scrolling however this doesn't update fast enough so it will scroll a little bit before being disabled.Does anyone know a solution to this? I really want the PanGestureHandler to wrap the flatlist so that the flatlist can re-render and update its items without making the PanGestureHandler re-render and therefore stop it's interaction logic.
Beta Was this translation helpful? Give feedback.
All reactions