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

[Feature Request] In v-number-input limit manual entry to min-max range #19438

Assignees
Labels
C: VNumberInput T: bug Functionality that does not work as intended/expected
Milestone

Comments

@crystalfp
Copy link

Problem to solve

In the new VNumberInput widget If I enter a value outside the min-max range I expect it will be changed to a value equal min or max when pushing Enter or widget losing focus. Currently the value is so adjusted only if I push increase/decrease buttons.
Also, if out-of range value is not passed to v-model variable, we have an inconsistency between show value and variable value.

Proposed solution

Add an event listener to Enter key and blur events and check the value against min/max adjusting it before passing to v-model. Adjust visualized value accordingly.

@yuwu9145 yuwu9145 self-assigned this Mar 24, 2024
@yuwu9145 yuwu9145 added T: bug Functionality that does not work as intended/expected and removed S: triage labels Apr 14, 2024
@johnleider johnleider added this to the v3.5.x milestone Apr 21, 2024
johnleider added a commit that referenced this issue Apr 21, 2024
fixes #19438
fixes #19558
fixes #19538
fixes #19494

Co-authored-by: John Leider <john@vuetifyjs.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment