scrollTo, next, prev animation problem
I have a requirement to programmatically transition to certain index of carousel and I am doing it like this: carouselRef?.current?.scrollTo({ index: index, animated: true })
But for some reason, there is no animation. I tried it with prev and next and for both, there is no animation. I'll attach a video so you can see how it behaves.
I am using:
"react-native": "0.70.5", "react-native-gesture-handler": "^2.9.0", "react-native-reanimated": "^2.12.0", "react-native-reanimated-carousel": "^3.3.0", "expo": "~47.0.6",
If you need more information feel free to request it.
Thanks!
By the way great lib!
https://user-images.githubusercontent.com/116439489/217340143-9a196a93-604b-44f8-9c52-57518823524e.mov
https://github.com/dohooo/react-native-reanimated-carousel/assets/30230906/430c26d4-4eb4-484f-bee7-d6cd3a31bc16
I have a similar issue just like @kockar96 , the animation is stopped ramdomly on Android, i have to scroll it manually for the carousel so that it can autoplay again . I am just copy the demo code from README.
I am using: "react-native": "0.71.5", "react-native-gesture-handler": "^2.8.0", "react-native-reanimated": "^3.0.0", "react-native-reanimated-carousel": "^3.3.2",
Same issue on my end:
https://github.com/dohooo/react-native-reanimated-carousel/assets/34189022/2369521d-3a03-4617-ba33-1edd9954993f
The animations work when interacting with the carousel, but not when calling scrollTo with the ref (clicking on the markers of the map).
animated: true works for me.
before carouselRef.current.scrollTo({index});
after carouselRef.current.scrollTo({index,animated: true});