react-native-reanimated-bottom-sheet icon indicating copy to clipboard operation
react-native-reanimated-bottom-sheet copied to clipboard

InnerScrolling not working

Open Arjun-aks opened this issue 4 years ago • 13 comments

Scrolling works fine in ios but not scroll in android

Arjun-aks avatar May 11 '20 08:05 Arjun-aks

+1

I have a similar issue with a horizontal scroll inside the header. Works on ios, but is buggy on android. If you use multiple fingers/play around with it, it will work. Otherwise, the bottom sheet keeps being selected.

Deep903 avatar May 11 '20 15:05 Deep903

Confirmed on Android for me.

markharding avatar May 12 '20 12:05 markharding

Possible workaround is to just put anything scrollable in the body and adjust the snap points accordingly so that the top portion of the body mimics a header.

Deep903 avatar May 12 '20 17:05 Deep903

Possible workaround is to just put anything scrollable in the body and adjust the snap points accordingly so that the top portion of the body mimics a header.

can you provide code example.

Arjun-aks avatar May 13 '20 02:05 Arjun-aks

https://github.com/osdnk/react-native-reanimated-bottom-sheet/issues/224#issuecomment-624772771

Just import ScrollView/FlatList from react-native-gesture-handler That works on android without any other workarounds

vertvvv avatar May 14 '20 08:05 vertvvv

#224 (comment)

Just import ScrollView/FlatList from react-native-gesture-handler That works on android without any other workarounds

Life saver. Thanks a lot man! 🙌

DevangMstryls avatar Jul 02 '20 18:07 DevangMstryls

Similar issue with horizontal ViewPager inside BottomSheet. Any workarounds?

mitsest avatar Jul 20 '20 14:07 mitsest

@vertvvv you are my hero bro ! thanks

mostafanadi avatar Nov 09 '20 07:11 mostafanadi

#224 (comment)

Just import ScrollView/FlatList from react-native-gesture-handler That works on android without any other workarounds

That 100% solved my issue as well. Thank you 😄

osikes avatar Nov 19 '20 21:11 osikes

#224 (comment)

Just import ScrollView/FlatList from react-native-gesture-handler That works on android without any other workarounds

thanks a lot

achmadfaturrizky avatar Dec 11 '20 17:12 achmadfaturrizky

I am having dififuclties getting the Slider from react-native-elements to work inside the bottom sheet. Any scrolling gets picked up by the bottom sheet. I tried setting the zIndex to 1 but it has to effect. I tried putting it in scroll view and its the same problem with the view getting priority even with zIndex set. Any suggestions ?

david03g avatar Jan 08 '21 01:01 david03g

I'm also having issues with using the Slider from react-native-slider and PagerView from react-native-pager-view inside the BottomSheet. Does anyone have any fixes for getting scrolling to work for these components inside a BottomSheet?

trentcowden avatar Mar 30 '21 22:03 trentcowden

@david03g Update: I discovered a workaround for this. I use a <Slider /> in my bottom sheet and couldn't get it to scrub on Android.

What I did was set enabledGestureInteraction to false and wrapped my bottom sheet component that gets rendered in the renderContent prop of the <BottomSheet /> in 2 <FlingGestureHandler /> components from react-native-gesture-handler--one to track an upwards fling and one to track a downwards fling. Then I just used the bottomSheetRef.snapTo(index) whenever it registers a fling event to snap to the correct view. Not quite as smooth but still works well!

trentcowden avatar Mar 31 '21 00:03 trentcowden