react-native-actions-sheet icon indicating copy to clipboard operation
react-native-actions-sheet copied to clipboard

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

Open jonxssc opened this issue 2 years ago • 6 comments

I tried all the stuff from other issues like Scrollview from react-native-gesture-handler or other stuff, all not working.

Improvment suggestion:

  • attach the swipe function only to the top indicator element, so scrolling works on the rest of the element
  • allow scrolling on different snappoints then fullscreen.

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

jonxssc avatar Nov 06 '22 14:11 jonxssc

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.

Amagnum avatar Nov 29 '22 18:11 Amagnum

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

JeffPatricio avatar Dec 13 '22 15:12 JeffPatricio

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.

jordanwegener avatar Apr 04 '24 08:04 jordanwegener

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

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

jonxssc avatar Apr 04 '24 08:04 jonxssc

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!

jordanwegener avatar Apr 04 '24 10:04 jordanwegener