-
Notifications
You must be signed in to change notification settings - Fork 21
Why is decelerationRate set to 0.88 for the FlatList used by DurationScroll? #56
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
Comments
Hey @Off2Race, thanks for raising this. The 0.88 deceleration rate was added to make the picker land on a value relatively quickly after a hefty scroll. It was a UX-preference rather than anything technical, so completely agree that it should be possible to change it with a prop. I can get this added when I next do some work on the library, or feel free to create a PR to get it merged sooner! |
Hi, @troberts-28 – Thanks for the quick response. I'll give it a shot and send you the PR! |
Hi, @troberts-28 – I noticed a couple of unrelated issues while working on this: 1 – There's a bug in the 2 – I followed the Contributing instructions but the |
Thank you for pointing these out! Will address them in the next release ✅ |
Welcome! Here's the PR – #57 |
Hello! While testing the TimerPicker component in my app, the scrolling behavior seems "sluggish" to me on iOS. In other words, if I spin the duration controls, it stops more quickly than I would expect.
I looked in the code and noticed that the decelerationRate prop is set to 0.88 for the internal FlatList component used by the DurationScroll component, which seems to be the cause.
QUESTIONS
1 – Why is this decelerationRate prop hardcoded to this value? I'm assuming it must be done for a reason :)
2 – Have you considered adding a decelerationRate prop to TimerPicker that would pass down so that users of the component can control it?
I'll likely create a patch so I can workaround this problem for myself but I figured I'd log this issue to raise the question.
The text was updated successfully, but these errors were encountered: