Replies: 1 comment
-
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
🤓 Question
I would like to use
react-spring
anddecay
prop to achieve the natural scrolling behavior. Unfortunately, I can't find how to stop decay animation at the closest row (not at the middle of the row).I would like to have some prop like
round
which saysreact-spring
where to stop at the end.Is it possible to achieve this with the current version of the
react-spring
? If yes, how can I do that?P.S. react-native's ScrollView has prop like
snapToInterval
which stops the view at the closest position to prevent element to be shown partially.UPDATE
Also, I was able to find such prop in popmotion lib. They have
modifyTarget
prop which allows to round the end position likemodifyTarget: position => Math.round(position / snapInterval) * snapInterval
Beta Was this translation helpful? Give feedback.
All reactions