-
-
Notifications
You must be signed in to change notification settings - Fork 283
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
Short scroll moves to the next index when pagingEnabled = true #583
Comments
To adjust the carousel's behavior to move to the nearest item with a smooth transition, ensuring only one item moves at a time, you can configure the <Carousel
data={data}
renderItem={renderItem}
pagingEnabled={false}
snapEnabled={true}
maxScrollDistancePerSwipe={itemWidth} // Assuming `itemWidth` is the width of your carousel item
minScrollDistancePerSwipe={10} // Adjust based on your preference for the minimum swipe sensitivity
// Other props as needed
/> In this setup, This approach differs from simply setting If you have any further questions or need more clarification, feel free to ask. Sources
|
From which version is available |
Did you manage to solve this @davidrestrepo07 |
I'm using react-native-reanimated-carousel in the default horizontal mode but when I do a very short scroll and have
pagingEnabled = true
andsnapEnabled = true
, it moves to the next item no matter how far away it is. Is there any way to make it move to the nearest item (whether it is the current item or the next one). The operation is similar to when you havepagingEnabled = false
andsnapEnabled = true
, but if you make a long/fast scroll it skips several items, what I want is that it is only one item at a time, as withpagingEnabled = true
.I tried
but it cancels the animation I triying to get an animation like this one https://imgur.com/c1BhjZm
The text was updated successfully, but these errors were encountered: