Open catanon opened 3 years ago
Sorry, please allow me to advertise for my open source library! ~ I think this library react-native-reanimated-carousel will solve your problem. It is a high performance and very simple component, complete with React-Native reanimated 2
Is this a bug report, a feature request, or a question?
Might not be a bug but rather a usage different than intended.
Have you followed the required steps before opening a bug report?
(Check the step you've followed - put an
x
character between the square brackets ([]
).)Have you made sure that it wasn't a React Native bug?
Yes. This is related to the looping behavior of Carousel.
Is the bug specific to iOS or Android? Or can it be reproduced on both platforms?
It happens on both.
Is the bug reproductible in a production environment (not a debug one)?
I couldn't find production mode on Snack.
Environment
Environment: Expo: 39.0.5 React: 16.13.1 React native: 0.63.2 react-native-snap-carousel: 3.9.1
Target Platform: Android (whichever version Snack used) iOS (14)
Expected Behavior
I'm nesting horizontal carousels inside a vertical carousel to create a grid system. Both dimensions allow looping. There will be buttons that let users jump to a specific screen.
Actual Behavior
It jumps to the correct row but not the correct column. (This happens to a different example from the demo below) After you jump, without changing the column, change the row in one direction and stop before it loops back to the wanted row. Peeking the wanted row, you might see the correct column. But it will change when you actually move to that row.
Reproducible Demo
https://snack.expo.io/@jloq/react-native-snap-carousel-nested-carousel Press the text to jump. Every text jumps to 1, 1. I believe the problem is that enabling looping made the innerRef in line 34 different than the snapped item of line 33. I already have a workaround of disabling looping in the outer carousel but looping is still preferable.
Steps to Reproduce