Skip to content
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

Consider supporting negative numbers or some type of "rollover" #1

Open
pandasys opened this issue Dec 25, 2021 · 1 comment
Open

Comments

@pandasys
Copy link
Contributor

Example, I display hours minutes seconds to allow the user to enter the duration of a piece of media. They can perform searches on how long a song is - show me all songs over 10 minutes.

For my seconds picker I give the range -1..60. My label function emits an empty string for -1 and 60. When the picker hits 60, I increment my "minutes" and set the "seconds" picker value to 0. Effectively the change is from 0:0:59 to 0:1:0. Works nicely with little effort on my part. The opposite does not work as the picker can never go below 0.

If I set a picker to -1..N, it will display -1 as the smallest value but does not allow me to move to that number. I've only glanced at the code, but could the picker possibly be genericized to work over any ClosedRange using start, endInclusive, and step functions? I'm only concerned with numbers at the moment, but seems this could be an even more versitale widget - a range value picker.

Thanks for publishing this. Very useful as is.

@r4phab
Copy link
Contributor

r4phab commented Dec 30, 2021

Hi @pandasys,
Thank you for the time taken to describe the issue, I'll surely try to address this soon !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants