@vaadin/combo-box 23.0.0-beta5 → 23.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +13 -13
- package/src/vaadin-combo-box-mixin.js +13 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/combo-box",
|
|
3
|
-
"version": "23.0.
|
|
3
|
+
"version": "23.0.1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -34,23 +34,23 @@
|
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
36
36
|
"@polymer/polymer": "^3.0.0",
|
|
37
|
-
"@vaadin/component-base": "23.0.
|
|
38
|
-
"@vaadin/field-base": "23.0.
|
|
39
|
-
"@vaadin/input-container": "23.0.
|
|
40
|
-
"@vaadin/item": "23.0.
|
|
41
|
-
"@vaadin/vaadin-lumo-styles": "23.0.
|
|
42
|
-
"@vaadin/vaadin-material-styles": "23.0.
|
|
43
|
-
"@vaadin/vaadin-overlay": "23.0.
|
|
44
|
-
"@vaadin/vaadin-themable-mixin": "23.0.
|
|
37
|
+
"@vaadin/component-base": "^23.0.1",
|
|
38
|
+
"@vaadin/field-base": "^23.0.1",
|
|
39
|
+
"@vaadin/input-container": "^23.0.1",
|
|
40
|
+
"@vaadin/item": "^23.0.1",
|
|
41
|
+
"@vaadin/vaadin-lumo-styles": "^23.0.1",
|
|
42
|
+
"@vaadin/vaadin-material-styles": "^23.0.1",
|
|
43
|
+
"@vaadin/vaadin-overlay": "^23.0.1",
|
|
44
|
+
"@vaadin/vaadin-themable-mixin": "^23.0.1"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@esm-bundle/chai": "^4.3.4",
|
|
48
|
-
"@vaadin/dialog": "23.0.
|
|
49
|
-
"@vaadin/polymer-legacy-adapter": "23.0.
|
|
48
|
+
"@vaadin/dialog": "^23.0.1",
|
|
49
|
+
"@vaadin/polymer-legacy-adapter": "^23.0.1",
|
|
50
50
|
"@vaadin/testing-helpers": "^0.3.2",
|
|
51
|
-
"@vaadin/text-field": "23.0.
|
|
51
|
+
"@vaadin/text-field": "^23.0.1",
|
|
52
52
|
"lit": "^2.0.0",
|
|
53
53
|
"sinon": "^9.2.0"
|
|
54
54
|
},
|
|
55
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "05fcc6daa21325753cf528c9c1072ccd8dd1e52e"
|
|
56
56
|
}
|
|
@@ -724,17 +724,21 @@ export const ComboBoxMixin = (subclass) =>
|
|
|
724
724
|
// to prevent a repetitive input value being saved after pressing ESC and Tab.
|
|
725
725
|
!itemMatchingByLabel
|
|
726
726
|
) {
|
|
727
|
+
const customValue = this._inputElementValue;
|
|
728
|
+
|
|
729
|
+
// Store reference to the last custom value for checking it on focusout.
|
|
730
|
+
this._lastCustomValue = customValue;
|
|
731
|
+
|
|
727
732
|
// An item matching by label was not found, but custom values are allowed.
|
|
728
733
|
// Dispatch a custom-value-set event with the input value.
|
|
729
734
|
const e = new CustomEvent('custom-value-set', {
|
|
730
|
-
detail:
|
|
735
|
+
detail: customValue,
|
|
731
736
|
composed: true,
|
|
732
737
|
cancelable: true,
|
|
733
738
|
bubbles: true
|
|
734
739
|
});
|
|
735
740
|
this.dispatchEvent(e);
|
|
736
741
|
if (!e.defaultPrevented) {
|
|
737
|
-
const customValue = this._inputElementValue;
|
|
738
742
|
this._selectItemForValue(customValue);
|
|
739
743
|
this.value = customValue;
|
|
740
744
|
}
|
|
@@ -1076,6 +1080,13 @@ export const ComboBoxMixin = (subclass) =>
|
|
|
1076
1080
|
return;
|
|
1077
1081
|
}
|
|
1078
1082
|
if (!this.readonly && !this._closeOnBlurIsPrevented) {
|
|
1083
|
+
// User's logic in `custom-value-set` event listener might cause input to blur,
|
|
1084
|
+
// which will result in attempting to commit the same custom value once again.
|
|
1085
|
+
if (!this.opened && this.allowCustomValue && this._inputElementValue === this._lastCustomValue) {
|
|
1086
|
+
delete this._lastCustomValue;
|
|
1087
|
+
return;
|
|
1088
|
+
}
|
|
1089
|
+
|
|
1079
1090
|
this._closeOrCommit();
|
|
1080
1091
|
}
|
|
1081
1092
|
}
|