@vaadin/vaadin-combo-box
Advanced tools
Comparing version 5.0.0 to 5.0.1
@@ -13,3 +13,3 @@ { | ||
"name": "@vaadin/vaadin-combo-box", | ||
"version": "5.0.0", | ||
"version": "5.0.1", | ||
"main": "vaadin-combo-box.js", | ||
@@ -40,3 +40,3 @@ "author": "Vaadin Ltd", | ||
"@vaadin/vaadin-overlay": "^3.2.0", | ||
"@vaadin/vaadin-text-field": "^2.3.0", | ||
"@vaadin/vaadin-text-field": "^2.4.3", | ||
"@vaadin/vaadin-themable-mixin": "^1.3.2", | ||
@@ -43,0 +43,0 @@ "@vaadin/vaadin-lumo-styles": "^1.1.1", |
@@ -108,2 +108,3 @@ /** | ||
this._boundInputValueChanged = this._inputValueChanged.bind(this); | ||
this.__boundInputValueCommitted = this.__inputValueCommitted.bind(this); | ||
} | ||
@@ -135,2 +136,3 @@ | ||
this.inputElement.addEventListener('input', this._boundInputValueChanged); | ||
this.inputElement.addEventListener('change', this.__boundInputValueCommitted); | ||
this._preventInputBlur(); | ||
@@ -142,5 +144,14 @@ } | ||
this.inputElement.removeEventListener('input', this._boundInputValueChanged); | ||
this.inputElement.removeEventListener('change', this.__boundInputValueCommitted); | ||
this._restoreInputBlur(); | ||
} | ||
__inputValueCommitted(e) { | ||
// Detect if the input was cleared (by clicking the clear button on a vaadin-text-field) | ||
// and propagate the value change to combo box value immediately. | ||
if (e.__fromClearButton) { | ||
this._clear(); | ||
} | ||
} | ||
get _propertyForValue() { | ||
@@ -147,0 +158,0 @@ return dashToCamelCase(this.attrForValue); |
@@ -353,3 +353,4 @@ /** | ||
const path = e.composedPath(); | ||
if (path.indexOf(this._clearElement) !== -1) { | ||
const isClearElement = (path.indexOf(this._clearElement) !== -1) || (path[0].getAttribute('part') === 'clear-button'); | ||
if (isClearElement) { | ||
this._clear(); | ||
@@ -615,3 +616,3 @@ this.focus(); | ||
this._inputElementValue = this.inputElement[this._propertyForValue]; | ||
this._filterFromInput(); | ||
this._filterFromInput(e); | ||
} | ||
@@ -621,3 +622,3 @@ } | ||
_filterFromInput(e) { | ||
if (!this.opened) { | ||
if (!this.opened && !e.__fromClearButton) { | ||
this.open(); | ||
@@ -624,0 +625,0 @@ } |
@@ -234,3 +234,3 @@ /** | ||
static get version() { | ||
return '5.0.0'; | ||
return '5.0.1'; | ||
} | ||
@@ -237,0 +237,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
108338
2622