Skip to content

[v4] When BottomSheetFlatList is scrolling, and BottomSheet is panning down, then BottomSheetFlatList scrolls to top #1939

Open
@theobouwman

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

  1. Have a BottomSheetFlatList with enough items so you can scroll.
  2. Fling the list so it scrolls to the bottom.
  3. Then drag the sheet down.
  4. You now see that the BottomSheetFlatList has scrolled al the way to the top.

Describe what you expected to happen:

  1. 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.

Metadata

Assignees

Labels

bugSomething isn't workingv5

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions