-
-
Notifications
You must be signed in to change notification settings - Fork 333
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
Index incorrect when data length changed. #281
Comments
Some known problems are logical issues, such as this |
Do you have any good ideas about controlling the index when dynamic modifying the data length? I think setting it manually is the safe way because I don't know what the user wants the index to do. |
I had a chance to take a good look at the code today, and yes, I've some ideas. Give me a day or two to work on it. I also plan to implement onEndReachedThreshold and onEndReached (like FlatList uses) to keep the scrolling smooth. |
@dohooo is there anyway to get an If I want to set a Is there a workaround we could use for now? Edit: Same issue using |
Can it help you for pagination? @RGDEV2022 |
@dohooo I'm confused. Even using that example the index is only changed when the item has actually snapped and it's not immediate on swipe. Here's my code
|
This is the wrong usage. The usage of And about reanimated value. |
@dohooo I'm not fully understanding why we need to use a |
Demo to reproduce:
https://github.com/nightness/carousel-bug
Existing Behaviour:
When swiping left to right on the 0th (initial) item, loads more but changes currentIndex to the end of the list after data updates.
Desired Behaviour:
When I add to the length of data, the current Index doesn't change. I don't want to see that jump to the end of the list of data.
The text was updated successfully, but these errors were encountered: