@vaadin/vaadin-text-field
Advanced tools
Comparing version 2.3.0-beta1 to 2.3.0
@@ -13,3 +13,3 @@ { | ||
"name": "@vaadin/vaadin-text-field", | ||
"version": "2.3.0-beta1", | ||
"version": "2.3.0", | ||
"main": "vaadin-text-field.js", | ||
@@ -41,5 +41,5 @@ "author": "Vaadin Ltd", | ||
"devDependencies": { | ||
"@polymer/iron-component-page": "^3.0.0-pre.18", | ||
"@polymer/iron-form": "^3.0.0-pre.18", | ||
"@polymer/iron-test-helpers": "^3.0.0-pre.18", | ||
"@polymer/iron-component-page": "^4.0.0", | ||
"@polymer/iron-form": "^3.0.0", | ||
"@polymer/iron-test-helpers": "^3.0.0", | ||
"@webcomponents/webcomponentsjs": "^2.0.0", | ||
@@ -46,0 +46,0 @@ "wct-browser-legacy": "^1.0.1", |
@@ -163,6 +163,11 @@ /** | ||
_decreaseValue() { | ||
const incrementSign = this._getAllowedIncrementSign(-1); | ||
const currentValueOverMax = this.max != null && this.value != null && this.value != '' && this.value > this.max; | ||
if (currentValueOverMax) { | ||
this._setValue(this.max); | ||
} else { | ||
const incrementSign = this._getAllowedIncrementSign(-1); | ||
if (incrementSign) { | ||
this.__add(incrementSign); | ||
if (incrementSign) { | ||
this.__add(incrementSign); | ||
} | ||
} | ||
@@ -172,6 +177,12 @@ } | ||
_increaseValue() { | ||
const incrementSign = this._getAllowedIncrementSign(1); | ||
const currentValueUnderMin = this.min != null && this.value != null && this.value != '' && this.value < this.min; | ||
if (incrementSign) { | ||
this.__add(incrementSign); | ||
if (currentValueUnderMin) { | ||
this._setValue(this.min); | ||
} else { | ||
const incrementSign = this._getAllowedIncrementSign(1); | ||
if (incrementSign) { | ||
this.__add(incrementSign); | ||
} | ||
} | ||
@@ -183,3 +194,7 @@ } | ||
// Behave like native number input adjusting to the next exact multiple of step. | ||
this.value = this.focusElement.value = this._getValue(incr); | ||
this._setValue(this._getValue(incr)); | ||
} | ||
_setValue(value) { | ||
this.value = this.focusElement.value = value; | ||
this.dispatchEvent(new CustomEvent('change', {bubbles: true})); | ||
@@ -186,0 +201,0 @@ } |
@@ -80,3 +80,3 @@ /** | ||
static get version() { | ||
return '2.3.0-beta1'; | ||
return '2.3.0'; | ||
} | ||
@@ -83,0 +83,0 @@ |
@@ -133,3 +133,3 @@ /** | ||
static get version() { | ||
return '2.3.0-beta1'; | ||
return '2.3.0'; | ||
} | ||
@@ -136,0 +136,0 @@ |
@@ -106,3 +106,3 @@ /** | ||
static get version() { | ||
return '2.3.0-beta1'; | ||
return '2.3.0'; | ||
} | ||
@@ -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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
90911
2040
0