You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I also have this issue but on component mount the carousel often end up between two slides.
The only way I can prevent this, is by delaying the index init/update with a setTimeout of 10ms. That's not very elegant but internally SideSwipe seems to do a similar thing: https://github.com/kkemple/react-native-sideswipe/blob/master/src/carousel.js#L91
I suspect the issue is coming from the FlatList offset being computed before the slides layout are fully resolved or something like that. Maybe there's a better workaround using onLayout.
When I set the currentIndex = 1, the offset is not applied until the sideswipe is interacted with. Setting the currentIndex = 0 works correctly.
First load (incorrect):
After Interaction (correct):
Thank you!
The text was updated successfully, but these errors were encountered: