-
Notifications
You must be signed in to change notification settings - Fork 651
Disable ScrollView vertical scroll whilst swipe is happening and vice versa #179
Comments
I initially was looking for the same until I realised that the
And for the Swipeout in the wrapper class I have
What I get is:
|
@ixje That looks pretty similar to what I was trying although I was using a FlatList rather than a ScrollView. FlatList is implemented using ScrollView so I would have thought this would have worked for both. Maybe I was doing something obvious wrong! I've since started using react-native-swipe-list-view in the end because it has this behaviour built in - and a few other built in nice-to-haves. It does however use the old style ListView so I might try this out again at some point. |
@richg-rma Makes sense to me what you're saying. Looking at #162 it appears your not alone when it comes to FlatList usage not working as some expect. A recent issue on the react-native repo on this topic might be worth following: facebook/react-native#14240 For what it's worth, I've only tested my solution on ios. |
Here the doc about ScrollView:
|
The same question, how do you solve it? |
I ended up using another module which represented a full list in the end called react-native-swipe-list-view |
Thank you. I'll take a look |
I solved this problem by doing the following: I've added
And then just added
Hope this is what you are looking for! |
I am trying to find a way to prevent the ScrollView parent from scrolling when a gesture is being used by Swipeout to swipe. At the moment I can accidentally swipe in both the X & Y directions which makes for a bad user experience.
I tried hooking into the 'scroll' property to enable and disable the ScrollView scrolling depending on whether it gets called with true or false but this doesn't seem to work. Is there an idiomatic way of doing this that I'm missing?
The text was updated successfully, but these errors were encountered: