overscrollEnabled={false} not respected when using next and previous buttons
Describe the bug
When using previous and next buttons, the carousel scrolls past the last item
and shows extra empty space after the last item even when overscrollEnabled is set to false. This is obviously do to the next and prev scrolling based on the width of the item and not checking if over-scrolling is occurring. overscrollEnabled={false} works as intended when swiping.
Expected behavior When clicking next the carousel shouldn't scroll past the last item
Screenshots
https://github.com/dohooo/react-native-reanimated-carousel/assets/16395981/74b7cfb3-c77f-4846-a8e7-0be5400be0f0
Versions (please complete the following information):
- "react": "18.2.0
- "react-native": "0.73.4",
- "react-native-reanimated": "~3.6.2"
- "react-native-reanimated-carousel": "^4.0.0-alpha.9"
- "react-native-gesture-handler": "~2.14.0"
Smartphone (please complete the following information):
- Device: Macbook
- OS: 14.2.1
- Browser Arc Browser
- Version 1.31.2
Additional context I can create a PR for this if pointed in the right direction
Can we please get this merged in?