react-navigation-bottom-sheet icon indicating copy to clipboard operation
react-navigation-bottom-sheet copied to clipboard

BottomSheetScrollView doesn't work!

Open firasrg opened this issue 2 years ago • 3 comments

Hello!

I have a sheet view with a scrollable list. The scroll doesn't work! We've tried many ways to solve it but nothing works! I've reproduced the issue within a snack

Please Help !

firasrg avatar Jul 22 '23 11:07 firasrg

To work properly you should use ScrollView from react-native-gesture-handler:

import { ScrollView } from 'react-native-gesture-handler';

eduduardo avatar Sep 20 '23 20:09 eduduardo

@eduduardo in this case we lose the possibility to close the BS with the scroll gesture, which is a feature of BottomSheetScrollView.

joseortiz9 avatar Oct 02 '23 12:10 joseortiz9

experiencing the same isssue

muhammadarsal avatar Nov 06 '23 09:11 muhammadarsal

Has anyone found a solution?

kamack38 avatar Aug 21 '24 14:08 kamack38

@kamack38 do you have same issue ? try to update to recent version 0.3.1

firasrg avatar Aug 21 '24 14:08 firasrg

@kamack38 do you have same issue ? try to update to recent version 0.3.1

I'm using the 0.3.2 version. With which ScrollView should it work?

kamack38 avatar Aug 21 '24 14:08 kamack38

@kamack38 you should use BottomSheetScrollView

firasrg avatar Aug 21 '24 14:08 firasrg

Big thanks, now that I try it, it actually works.

If you wouldn't mind I have quick question for you. Do you know how can I "subscribe" to the current snapPoint change, or how can I get the current snap point?

kamack38 avatar Aug 21 '24 14:08 kamack38

Oh great, that means this issue is solved ✅. If you want to follow the snappoints, I think you need to use the snapToPosition() api (check documentation)

firasrg avatar Aug 21 '24 14:08 firasrg

This allows me to change the snapPoint, but I want to change the content depending on the current snapPoint. So for example I want to display what the current snapPoint is in a form of a text.

kamack38 avatar Aug 21 '24 14:08 kamack38

@kamack38 maybe useBottomSheetDynamicSnappoints()

firasrg avatar Aug 21 '24 15:08 firasrg

I think I was looking for animatedIndex, but thanks for the help nonetheless.

kamack38 avatar Aug 21 '24 16:08 kamack38