Open jonxssc opened 1 year ago
Are you using the scroll handlers hook? Tried it myself and didn't have much luck, had to disable gesture handling to get vertical content scrolling for actions sheets with a scrollview inside. Other issue but no resolution on it yet https://github.com/ammarahm-ed/react-native-actions-sheet/issues/220
Cheap fix, Disabled the gesture-enabled and use another scroll view with Refresh Control to trigger sheet closing.
I had the same problem without the scroll working even with the hooks, so I forced the scrollEnabled on the FlatList to override the flag that comes from the hook, since then it works normally even with the gestureEnabled. (I don't know if this can cause any other problems with the sheet's operation)
<FlatList {...scrollHandlers} scrollEnabled <-------------- data={options} />
I had the same problem without the scroll working even with the hooks, so I forced the scrollEnabled on the FlatList to override the flag that comes from the hook, since then it works normally even with the gestureEnabled. (I don't know if this can cause any other problems with the sheet's operation)
<FlatList {...scrollHandlers} scrollEnabled <-------------- data={options} />
This isn't working for me now, FlatList
and ScrollView
both seem to be broken when gestures are on.
Are you importing the scrollview from the package? When doing this it should work:
import ActionSheet,{ScrollView,useScrollHandlers} from 'react-native-actions-sheet';
Are you importing the scrollview from the package? When doing this it should work:
import ActionSheet,{ScrollView,useScrollHandlers} from 'react-native-actions-sheet';
Thank you, those work!
I tried all the stuff from other issues like Scrollview from react-native-gesture-handler or other stuff, all not working.
Improvment suggestion:
For all searching for an Solution to this problem: Wrap all the content inside the Scrollview with a Pressable, not a very nice solution but it works for now