[v4] | [v2] enablePanDownToClose not work with List on 4.4.3 version on IOS devices
Bug
With the example project of this library 4.4.3 version. On iOS devices, all of the basic List with enablePanDownToClose == true (prop of BottomSheetModal/BottomSheet) doesn't work.
Environment info
| Library | Version |
|---|---|
| @gorhom/bottom-sheet | latest |
| react-native | latest |
| react-native-reanimated | latest |
| react-native-gesture-handler | latest |
Steps To Reproduce
- Open react-native-bottom-sheet example project
- Open FlatListoption on Basic section
- Scroll from top to bottom of the FlatList
Describe what you expected to happen:
1.On iOS When scroll down FlatList or VirtualizedList inside BottomSheetModal/BottomSheet will close the BottomSheet 2..
Reproducible sample code
<View style={styles.container}>
<BottomSheet
ref={bottomSheetRef}
index={1}
snapPoints={snapPoints}
onChange={handleSheetChanges}
enablePanDownToClose={true}
>
<FlatList ..props />
</BottomSheet>
</View>
I can confirm this issue, but its not the bottom sheet version which causes the issue, it's more likely react native 0.69, reanimated 2.9.1 or react native gesture handler 2.5.0 or react-native-screens. Specially RNS had some huge gesture recognizer updates
@7maucdn is this happening with Expo or a project without Expo?
Gorhom and I invested a decent amount of time for this issue. It's related to Expo and ONLY happens in Dev mode. As soon as you build a release, the pan down to close feature works. So while it's annoying right now to test the features, they work when you create a release build
https://github.com/software-mansion/react-native-gesture-handler/issues/2169
Fixed in expo-dev-client v1.2.1 as noted in the issue that @hirbod linked to.
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
I am using react-native cli and "@gorhom/bottom-sheet": "^4.6.1". i am using BottomSheetModal and FlatList inside it and enablePanDownToClose is not working. It works if I use BottomSheetFlatList. But, I want to use onScroll event and I cannot find onScroll in BottomSheetFlatList.