[v4] | [v2] BottomSheetSectionList (and other scrollable elements) doesn't work on IOS
Bug
Environment info
| Library | Version |
|---|---|
| @gorhom/bottom-sheet | ^4 |
| react-native | 0.63.3 |
| react-native-reanimated | ^2.0.0 |
| react-native-gesture-handler | ~1.10.2 |
Steps To Reproduce
- Check code below
- If you drag BottomSheet up, nothing happens.
Describe what you expected to happen:
- BottomSheetSectionList should work as expected
Reproducible sample code
<BottomSheet
snapPoints={snapPoints}
content={() => (
<BottomSheetSectionList
alwaysBounceHorizontal={false}
alwaysBounceVertical={false}
bounce={false}
bouncesZoom={false}
showsVerticalScrollIndicator={false}
sections={MOCK_DATA_ARRAY}
keyExtractor={(item) => item.id}
renderSectionHeader={({ section: { title } }) => (
<View>
<Text style={{ color: "white" }}>{title}</Text>
</View>
)}
renderItem={({ item }) => <View><Text style={{ color: "white" }}>{item.title}</Text></View>}
/>
)}
enableOverDrag={true}
setScrollEnabled={setScrollEnabled}
bottomSheetRef={bottomSheetRef}
/>
https://user-images.githubusercontent.com/20489656/140971487-3bd019f3-a7e9-42d7-97bc-cd156ee32b5d.MP4
All of scrollable components doesn't work on IOS(10-13 IPhone)
Same for me. BottomSheetSectionList is not scrolling, when snapped to a point, Only scrolls when it is snapped to the final index (i.e. 90% or 100%). Tested both on android and iOS, it's the same issue.
Hope there will be a solution for this.
Tested both on android and iOS, it's the same issue.
I have no problem with this lib on Android, all works perfectly. Only on IOS devices has this problem
The way I solved my issue was, Using Flatlist from react-native-gesture-handler(This was also a suggestion on Troubleshooting page on react-native-bottom-sheet), and using the Flatlist in such a way that it mimics the section list, that meaning, section headers are Flatlist item. Then there is no gesture conflicts and it works for my case. Can't say for sure it will help you though.
The way I solved my issue was, Using
Flatlistfromreact-native-gesture-handler(This was also a suggestion on Troubleshooting page onreact-native-bottom-sheet), and using theFlatlistin such a way that it mimics the section list, that meaning, section headers areFlatlistitem. Then there is no gesture conflicts and it works for my case. Can't say for sure it will help you though.
Tried your solution and it's working for scrolling well except that if i'm not on final snappoint, i can't scroll to the bottom (a part of the flatlist is out of screen). Did you face the same issue ?
This appears to still be an issue, and no scrollable components provided by this library work.
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.
This issue was closed because it has been stalled for 5 days with no activity.
I'm getting this same error. I can't scroll down in a BottomSheetFlatList on iOS on the first try... need a bunch of tries. (This is on simulator.)
Also running into this issue when using SectionList from this lib, but weirdly it breaks only when adding some list optimization props. I have 4.1.5 installed. @gorhom any ideas or anywhere we can help investigate?