Closed
Description
Hey @dohooo, I've been looking at your [multiple example](https://github.com/dohooo/react-native-reanimated-carousel/blob/main/exampleExpo/src/multiple/index.tsx) again, and I've been hitting an issue which I would call "overscrolling".
When the carousel is set to "loop", everything works as expected, however when loop is disabled, you can scroll the last element all the way to "position 1" instead of it being the last item in the carousel.
Current Implementation:
Slot 1 | Slot 2 | Slot 3 |
---|---|---|
LastItem | Empty | Empty |
Ideal Implementation
Slot 1 | Slot 2 | Slot 3 |
---|---|---|
ThirdLastItem | SecondLastItem | LastItem |
I've attached a minimal reproduction in expo here:
https://snack.expo.dev/@srobbins/reanimated-carousel-overscroll-example
I think this would be made possible by allowing us to set maxPages on the ScrollViewGesture, where maxPages would be totalItems.length - numberOfItemsOnScreen
, however there would still be a slight problem of navigating to the last item.
Curious what you think about this!
Edit: I believe this is the same issue as #240.
Originally posted by @IAmNatch in #88 (comment)