Commit a892ba6ac0fd68c400f341f948095763f960800d

Authored by Sergio Crisostomo
1 parent 7d25930a

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) {