Commit 7a9f6b28fc98cc97c6833ab3999dfccac19a25ad
Committed by
GitHub
Merge pull request #2213 from SergioCrisostomo/fix-number-input
prevent firing change when typing numbers < min
Showing
1 changed file
with
1 additions
and
0 deletions
Show diff stats
src/components/input-number/input-number.vue
... | ... | @@ -263,6 +263,7 @@ |
263 | 263 | if (!isNaN(val) && !isEmptyString) { |
264 | 264 | this.currentValue = val; |
265 | 265 | |
266 | + if (event.type == 'input' && val < min) return; // prevent fire early in case user is typing a bigger number. Change will handle this otherwise. | |
266 | 267 | if (val > max) { |
267 | 268 | this.setValue(max); |
268 | 269 | } else if (val < min) { | ... | ... |