Is this a bug report or a feature request?
Have you read the guidelines regarding bug report?
Have you read the documentation in its entirety?
Have you made sure that your issue hasn’t already been reported/solved?
I have seen multiple similar issues (#313, #63, #193, #235). I haven’t been able to find any duplicates, though. Most of these have ended up being issues with FlatList. However, I don’t see that being the case for this issue, as an implementation using FlatList’s
scrollToOffset shouldn’t give any issues. I haven’t tested it, though.
Is the bug specific to iOS or Android? Or can it be reproduced on both platforms?
To be honest, I haven’t tested it on iOS. I have only tested on Android 8.1.0
Is the bug reproductible in a production environment (not a debug one)?
Yes. I’ve reproduced it on Android with an app signed and bundled for release.
Have you made sure that it wasn’t a React Native bug?
It might be an issue with Flatlist, as setting
windowSize to large values fixes it.
However, I think an implementation using FlatList’s
scrollToOffset could fix it.
Have you been able to reproduce the bug in the provided example?
No, I have not reproduced it in the example. I have provided a minimal Snack.
React native: 0.55.4
Steps to Reproduce
- Set up a carousel with a large dataset
- Try to use carousel.snapToItem(index) with a large index
- See that it doesn’t scroll all the way.
Carousel scrolls to the large index.
Carousel does not scroll to the large index. It only scrolls to the last item currently rendered.
Have a snack!
Lastly, I just wanted to thank you. Awesome project, guys!