@vaadin/vaadin-text-field
Advanced tools
Comparing version 2.5.0 to 2.5.1
@@ -13,3 +13,3 @@ { | ||
"name": "@vaadin/vaadin-text-field", | ||
"version": "2.5.0", | ||
"version": "2.5.1", | ||
"main": "vaadin-text-field.js", | ||
@@ -16,0 +16,0 @@ "author": "Vaadin Ltd", |
@@ -33,3 +33,3 @@ /** | ||
static get version() { | ||
return '2.5.0'; | ||
return '2.5.1'; | ||
} | ||
@@ -36,0 +36,0 @@ |
@@ -36,3 +36,3 @@ /** | ||
static get version() { | ||
return '2.5.0'; | ||
return '2.5.1'; | ||
} | ||
@@ -39,0 +39,0 @@ |
@@ -79,3 +79,3 @@ /** | ||
static get version() { | ||
return '2.5.0'; | ||
return '2.5.1'; | ||
} | ||
@@ -117,3 +117,2 @@ | ||
type: Number, | ||
reflectToAttribute: true, | ||
value: 1, | ||
@@ -301,3 +300,8 @@ observer: '_stepChanged' | ||
_stepChanged(step) { | ||
this.inputElement.step = step; | ||
// Avoid using initial value in validation | ||
this.__validateByStep = this.__stepChangedCalled || this.getAttribute('step') !== null; | ||
this.inputElement.step = this.__validateByStep ? step : 'any'; | ||
this.__stepChangedCalled = true; | ||
this.setAttribute('step', step); | ||
} | ||
@@ -336,10 +340,13 @@ | ||
__onInputChange() { | ||
this.checkValidity(); | ||
this.validate(); | ||
} | ||
checkValidity() { | ||
validate() { | ||
// text-field mixin does not check against `min`, `max` and `step` | ||
if (this.min !== undefined || this.max !== undefined || this.step !== 1) { | ||
if (this.min !== undefined || this.max !== undefined || this.__validateByStep) { | ||
this.invalid = !this.inputElement.checkValidity(); | ||
} else { | ||
this.invalid = !super.checkValidity(); | ||
} | ||
return super.checkValidity(); | ||
@@ -346,0 +353,0 @@ } |
@@ -79,3 +79,3 @@ /** | ||
static get version() { | ||
return '2.5.0'; | ||
return '2.5.1'; | ||
} | ||
@@ -82,0 +82,0 @@ |
@@ -133,3 +133,3 @@ /** | ||
static get version() { | ||
return '2.5.0'; | ||
return '2.5.1'; | ||
} | ||
@@ -136,0 +136,0 @@ |
@@ -106,3 +106,3 @@ /** | ||
static get version() { | ||
return '2.5.0'; | ||
return '2.5.1'; | ||
} | ||
@@ -109,0 +109,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
102959
16631
2356
22