[v4] When BottomSheetFlatList is scrolling, and BottomSheet is panning down, then BottomSheetFlatList scrolls to top #1939
Open
Description
Bug
When BottomSheetFlatList is scrolling, and BottomSheet is panning down, then BottomSheetFlatList scrolls to top.
Here a screen recording:
RPReplay_Final1726515224.MP4
Environment info
Library | Version |
---|---|
@gorhom/bottom-sheet | ^4.5.1 |
react-native | 0.70.14 |
react-native-reanimated | ^2.10.0 |
react-native-gesture-handler | ~2.5.0 |
Steps To Reproduce
- Have a BottomSheetFlatList with enough items so you can scroll.
- Fling the list so it scrolls to the bottom.
- Then drag the sheet down.
- You now see that the BottomSheetFlatList has scrolled al the way to the top.
Describe what you expected to happen:
- We use this setup for an infinite feed and expect it just stay where you left it after scrolling.
Reproducible sample code
https://snack.expo.dev/bbA39-KvJDVDDnjqWk1. with example code.
When we use FlashList (https://shopify.github.io/flash-list/docs/) we don't have this jump-to-top bug. But we lose a lot of integration with BottomSheet. And scrolling does not work with FlashList in BottomSheet on Android. So not a good solution.