-
-
Notifications
You must be signed in to change notification settings - Fork 329
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
react-native-reanimated-carousel carouselRef.current.scrollTo does not work properly. #657
Comments
Hey @zahidalidev! I'm here to help you with any bugs or questions you have in this repository. If you need assistance, feel free to ask. The issue with the ### Bug Fixes
- scrollTo is not running properly ([f406258](https://github.com/dohooo/react-native-reanimated-carousel/commit/f406258585e203a880ea82992c4ac79237f16df5)), closes [#222](https://github.com/dohooo/react-native-reanimated-carousel/issues/222) Ensure you are using version 3.0.4 or later of the |
@dosu I also have a problem with scrollTo, but on web |
@dosu I'm using version 3.4.0 and it's not working as expected. |
@zahidalidev and @gavrilikhin-d, there is a known issue with the For web platforms, ensure you are using the correct parameters and configurations as outlined in the documentation. Here is an example of how to use the ref.current?.scrollTo({ count: -1, animated: true }); Additionally, you can use the ref.current?.prev({ animated: true });
ref.current?.next({ animated: true }); For more detailed examples and usage guidelines, you can refer to the documentation [1][2][3]. If the issue persists, consider checking for any updates or patches beyond version 3.4.0 that might address this problem. |
@dosu here are details of package versions and device that I'm using: Versions:
Device:
|
It looks like you're using the correct versions of the packages, but you're still experiencing issues with the
If the issue persists after trying these suggestions, consider opening an issue on the repository with detailed information about your setup and the problem you're facing. This will help the maintainers investigate and provide a fix. |
I also have similar issues with |
I was able to get ref working by migrating to the alpha branch: https://github.com/dohooo/react-native-reanimated-carousel/tree/v4.0.0-alpha.12 |
I also have an issue with |
Describe the bug
The carouselRef.current.scrollTo method isn't functioning as expected. When used to scroll to a specific index, it briefly displays the correct image but then automatically scrolls back to the first index.
On iOS, combining carouselRef.current.scrollTo with a default index resolves this issue. However, on Android, although I can dynamically set the default index, this method does not allow for animated scrolling, which limits the experience.
To Reproduce
Just configure the Carousel and try to scroll/change the image to a specific index.
Expected behavior
Should scroll the image to a specific index.
Versions (please complete the following information):
Smartphone (please complete the following information):
The text was updated successfully, but these errors were encountered: