Closed tsalama closed 2 years ago
Thanks for reminding me to fix it ASAP.
onProgressChange should not return an absoluteProgress that is greater than 1 when swiping past the beginning or end of the carousel.
It fixed in the latest version.
onSnapToItem should always be called even if swiping past the beginning or end of the carousel (since the first or last element are eventually snapped to)
And this question, I think u should use onScrollEnd
prop.
I'm still having this issue with onScrollEnd
not triggering when swiping to the beginning or end with mode="parallax"
and loop={false}
react-native
version: 0.72.6
react-native-reanimated
version: 3.6.1
react-native-reanimated-carousel
version: 3.5.1
Same issue, onScrollEnd
and onSnapToItem
not triggering with loop={false}
"react-native": "0.73.6",
"react-native-reanimated": "~3.6.2",
"react-native-reanimated-carousel": "^3.5.1",
Hello! Firstly, I wanted to say thank you for this amazing library!
With that, I would like to report a bug.
To Reproduce Steps to reproduce the behavior:
When the carousel is used with the following props, swiping past the beginning (left) or end (right) of the carousel does NOT trigger
onSnapToItem
, andonProgressChange
can return anabsoluteProgress
of greater than 1 --- the latter produces unexpected behavior for progress bars / pagination dots.The value for
snapEnabled
do not seem to affect this behavior for the second issue. For the first issue, I'm aware thatonSnapToItem
is not called at all in general when bothpagingEnabled
andsnapEnabled
are false.Expected behavior
onSnapToItem
should always be called even if swiping past the beginning or end of the carousel (since the first or last element are eventually snapped to)onProgressChange
should not return anabsoluteProgress
that is greater than 1 when swiping past the beginning or end of the carousel.Versions (please complete the following information):
Smartphone (please complete the following information):