-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Number input widget #762
Number input widget #762
Conversation
It looks good so far, there are some comments about how to remove the There is a bug with your implementation of the max value. Lets say I clear the input to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you so much for this! 😄
It may be interesting to contribute this widget to iced_aw
first. This is, since very recently, the official community crate for additional widgets (see #761). I think it will be easier for users to contribute and improve the widget further there and then, once it eventually matures enough, we could migrate it to this repository.
Ideally, we should leave this repository for important fixes and core changes. This way, I can stop bottlenecking interesting contributions while focusing on the core parts of the library!
Sounds like a good idea 😉. If you have problems with moving your widget to iced_aw, please let me know.
This can be easily done with
As far as I know, this is currently not possible. It would require the widget to send an update/message by itself after some period, wich is currently not implemented. This is slightly related to #31 and #560 .
For comparison, I looked at how the number-input field of HTML handles this (chromium). The maximum value there, is not considered at all with the text input. With a max value of 220 you can easily enter 9999990 or similar. I find persöhnlich also not just intuitive. However, with your suggestion I would rather go for |
Thank for review @13r0ck. I've format the example for convenient as you told. I also merge with your branch(more_scroll) and in the integration, I've change on scroll event to increase or decrease the value directly inside widget logic because I don't want user to handle those two messages by themselves, but the logic its self is still the same. I was given you credit on that section, Hope you don't mind on that.
This update is fixed those bugs if I do understand you well. So, please check on that again if there is some point I missing. Leave it a comment. Thank again for spending your time on review. |
Yeah, you are welcome. I'll put this widget in that repo when the time allowed. I got a lot of ideas from the repo, hahaa.
Ohh I see. Thank for warm welcome. |
Thank for interested on the widget. Good if we can works together.
Not now, but soon hahaa.
This update has implementation on that event which I merge from @13r0ck. Thank to @13r0ck.
This widget is required max value for checking valid number, not like the number input in HTML. |
I am going to hold out on more input until this PR is moved over to Iced aw. This is going to be a useful widget! |
Since this is now merged into |
Hi there, I would like to PR that implement number input widget in #209 issue. I have also added a simple example for show case this widget. I'm look forward to see any idea, feel free to improve it or leave a comment here.