@vaadin/combo-box 23.1.0-beta2 → 23.1.0-beta3
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 +14 -14
- package/src/vaadin-combo-box-mixin.js +13 -9
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/combo-box",
|
|
3
|
-
"version": "23.1.0-
|
|
3
|
+
"version": "23.1.0-beta3",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -36,24 +36,24 @@
|
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
38
38
|
"@polymer/polymer": "^3.0.0",
|
|
39
|
-
"@vaadin/component-base": "23.1.0-
|
|
40
|
-
"@vaadin/field-base": "23.1.0-
|
|
41
|
-
"@vaadin/input-container": "23.1.0-
|
|
42
|
-
"@vaadin/item": "23.1.0-
|
|
43
|
-
"@vaadin/lit-renderer": "23.1.0-
|
|
44
|
-
"@vaadin/vaadin-lumo-styles": "23.1.0-
|
|
45
|
-
"@vaadin/vaadin-material-styles": "23.1.0-
|
|
46
|
-
"@vaadin/vaadin-overlay": "23.1.0-
|
|
47
|
-
"@vaadin/vaadin-themable-mixin": "23.1.0-
|
|
39
|
+
"@vaadin/component-base": "23.1.0-beta3",
|
|
40
|
+
"@vaadin/field-base": "23.1.0-beta3",
|
|
41
|
+
"@vaadin/input-container": "23.1.0-beta3",
|
|
42
|
+
"@vaadin/item": "23.1.0-beta3",
|
|
43
|
+
"@vaadin/lit-renderer": "23.1.0-beta3",
|
|
44
|
+
"@vaadin/vaadin-lumo-styles": "23.1.0-beta3",
|
|
45
|
+
"@vaadin/vaadin-material-styles": "23.1.0-beta3",
|
|
46
|
+
"@vaadin/vaadin-overlay": "23.1.0-beta3",
|
|
47
|
+
"@vaadin/vaadin-themable-mixin": "23.1.0-beta3"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@esm-bundle/chai": "^4.3.4",
|
|
51
|
-
"@vaadin/dialog": "23.1.0-
|
|
52
|
-
"@vaadin/polymer-legacy-adapter": "23.1.0-
|
|
51
|
+
"@vaadin/dialog": "23.1.0-beta3",
|
|
52
|
+
"@vaadin/polymer-legacy-adapter": "23.1.0-beta3",
|
|
53
53
|
"@vaadin/testing-helpers": "^0.3.2",
|
|
54
|
-
"@vaadin/text-field": "23.1.0-
|
|
54
|
+
"@vaadin/text-field": "23.1.0-beta3",
|
|
55
55
|
"lit": "^2.0.0",
|
|
56
56
|
"sinon": "^13.0.2"
|
|
57
57
|
},
|
|
58
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "c787ceb8a312f88631c6d429ff320d5f89b1b838"
|
|
59
59
|
}
|
|
@@ -971,15 +971,19 @@ export const ComboBoxMixin = (subclass) =>
|
|
|
971
971
|
this._selectItemForValue(this.value);
|
|
972
972
|
}
|
|
973
973
|
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
974
|
+
// Do not update `_focusedIndex` to from `-1` to old value during scroll.
|
|
975
|
+
// Otherwise, the scroll would jump back to the previously focused item.
|
|
976
|
+
if (!this.loading) {
|
|
977
|
+
const inputValue = this._inputElementValue;
|
|
978
|
+
if (inputValue === undefined || inputValue === this._getItemLabel(this.selectedItem)) {
|
|
979
|
+
// When the input element value is the same as the current value or not defined,
|
|
980
|
+
// set the focused index to the item that matches the value.
|
|
981
|
+
this._focusedIndex = this.$.dropdown.indexOfLabel(this._getItemLabel(this.selectedItem));
|
|
982
|
+
} else {
|
|
983
|
+
// When the user filled in something that is different from the current value = filtering is enabled,
|
|
984
|
+
// set the focused index to the item that matches the filter query.
|
|
985
|
+
this._focusedIndex = this.$.dropdown.indexOfLabel(this.filter);
|
|
986
|
+
}
|
|
983
987
|
}
|
|
984
988
|
}
|
|
985
989
|
}
|