react-native-reanimated-carousel icon indicating copy to clipboard operation
react-native-reanimated-carousel copied to clipboard

scrollTo, next, prev animation problem

Open kockar96 opened this issue 2 years ago • 4 comments

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!

kockar96 avatar Feb 07 '23 18:02 kockar96

https://user-images.githubusercontent.com/116439489/217340143-9a196a93-604b-44f8-9c52-57518823524e.mov

kockar96 avatar Feb 07 '23 18:02 kockar96

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",

Iamivan1996 avatar May 18 '23 08:05 Iamivan1996

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

mojavad avatar Aug 03 '23 20:08 mojavad

animated: true works for me.

before carouselRef.current.scrollTo({index});

after carouselRef.current.scrollTo({index,animated: true});

zeeshan-shabbir avatar Mar 24 '24 07:03 zeeshan-shabbir