ammarahm-ed / react-native-actions-sheet

A Cross Platform(Android, iOS & Web) ActionSheet with a flexible api, native performance and zero dependency code for react native. Create anything you want inside ActionSheet.
https://rnas.vercel.app
MIT License
1.49k stars 121 forks source link

Scrollview/Flatlist scrolling not working on all Platforms + Project Example #239

Open jonxssc opened 1 year ago

jonxssc commented 1 year ago

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

johnny-mcfadden-dailypay commented 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

Amagnum commented 1 year ago

Cheap fix, Disabled the gesture-enabled and use another scroll view with Refresh Control to trigger sheet closing.

JeffPatricio commented 1 year ago

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} />

jordanwegener commented 6 months ago

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.

jonxssc commented 6 months ago

Are you importing the scrollview from the package? When doing this it should work:

import ActionSheet,{ScrollView,useScrollHandlers} from 'react-native-actions-sheet';

jordanwegener commented 6 months ago

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!