Commit 7a9f6b28fc98cc97c6833ab3999dfccac19a25ad

Authored by Aresn
Committed by GitHub
2 parents 7d25930a a892ba6a

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,6 +263,7 @@
263 if (!isNaN(val) && !isEmptyString) { 263 if (!isNaN(val) && !isEmptyString) {
264 this.currentValue = val; 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 if (val > max) { 267 if (val > max) {
267 this.setValue(max); 268 this.setValue(max);
268 } else if (val < min) { 269 } else if (val < min) {