Open LetUsGeek opened 3 years ago
I'd like to add that it seems that snapTo()
function only works the very first time.
Indeed I want the bottom list to close after an item is selected (via an onPress event). The snapTo function only works the first time avec application opening.
Anybody understand why?
Current Behavior
I'm pretty new in react-native so maybe I missed it. Anyway the ScrollBottomSheet seems working OK. I wanted to add the possibility to open (respectively close) fully the ScrollBottomSheet when I tap on the handle while the bottome sheet is closed (respectively open).
So display the handle through TouchableOpacity and detect onPress event on which I call the function snapTo of my ScrollBottomSheet depending on the current index provided by onSettle event.
The onSettle event works on all snapping Points, however the onPress event does not work when the ScrollBottomSheet is closed.
My component:
Expected Behavior
I expect the onPress event when my ScrollBottomSheet is closed to be detected so I can just by one tap open the list immediately.
How to reproduce
This not an expo project. The code above should work to reproduce my issue.
Your Environment
Test on Android My dependencies: