-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
snapToItem bug #495
Comments
As stated in these:
Unless you provide a Snack example in which the issue can be reproduced, as well as a complete description of everything you've tried, we won't be able to help you and the thread will be closed. |
I have the same issue. @mlop113 were you able to find a solution? |
I can confirm that this issue has a bug on the latest RN version 0.59.8 |
+1 |
@eggybot @yoavapi Can you tell me if you experience the issue with and without prop |
same experience with and without loop. |
@bd-arc when we enable loop on the carousel it renders 3 clones, right? (or 6?) If I press a button which is dynamically calling this._carousel.snapToItem(index) the menu is flickering and not going to the right index. WHat is going wrong? |
@kevinvugts |
I am only experiencing this when I have loop=enabled. Do you know what's going wrong? Please have a look: https://www.youtube.com/watch?v=f5b7vzuIzHc&feature=youtu.be |
Hi @bd-arc I am experiencing this only with loop=true please see the attached video above. Code
|
UpdateI changed the snapToItemFunction to:
And the above code seems to work properly. However it does interfere with the snapToNext() and snapToPrevious methods |
If you are facing : simply add prop: example:
|
This comment was marked as spam.
This comment was marked as spam.
I add this function in the file "react-native-snap-carousel/src/carousel/Carousel.js", it's above function "snapToNext" snapToFist (index, animated = true, fireCallback = true) {
this._snapToItem(0, animated, fireCallback);
} Or you can use my branch:
|
when I use
snapToItem(index, false)
with X > 3, It was usually return me to my Index then turn back to Index 0. I don't know why?, I don't add any propsThe text was updated successfully, but these errors were encountered: