@vaadin/multi-select-combo-box 23.5.12 → 23.6.0
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 +10 -10
- package/src/vaadin-multi-select-combo-box.js +16 -1
- package/web-types.json +1 -1
- package/web-types.lit.json +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/multi-select-combo-box",
|
|
3
|
-
"version": "23.
|
|
3
|
+
"version": "23.6.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -37,14 +37,14 @@
|
|
|
37
37
|
],
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@polymer/polymer": "^3.0.0",
|
|
40
|
-
"@vaadin/combo-box": "~23.
|
|
41
|
-
"@vaadin/component-base": "~23.
|
|
42
|
-
"@vaadin/field-base": "~23.
|
|
43
|
-
"@vaadin/input-container": "~23.
|
|
44
|
-
"@vaadin/lit-renderer": "~23.
|
|
45
|
-
"@vaadin/vaadin-lumo-styles": "~23.
|
|
46
|
-
"@vaadin/vaadin-material-styles": "~23.
|
|
47
|
-
"@vaadin/vaadin-themable-mixin": "~23.
|
|
40
|
+
"@vaadin/combo-box": "~23.6.0",
|
|
41
|
+
"@vaadin/component-base": "~23.6.0",
|
|
42
|
+
"@vaadin/field-base": "~23.6.0",
|
|
43
|
+
"@vaadin/input-container": "~23.6.0",
|
|
44
|
+
"@vaadin/lit-renderer": "~23.6.0",
|
|
45
|
+
"@vaadin/vaadin-lumo-styles": "~23.6.0",
|
|
46
|
+
"@vaadin/vaadin-material-styles": "~23.6.0",
|
|
47
|
+
"@vaadin/vaadin-themable-mixin": "~23.6.0"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@esm-bundle/chai": "^4.3.4",
|
|
@@ -56,5 +56,5 @@
|
|
|
56
56
|
"web-types.json",
|
|
57
57
|
"web-types.lit.json"
|
|
58
58
|
],
|
|
59
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "ec19662fcd35fb8ab6baa73c418ef235d7f26a14"
|
|
60
60
|
}
|
|
@@ -934,11 +934,26 @@ class MultiSelectComboBox extends ResizeMixin(InputControlMixin(ThemableMixin(El
|
|
|
934
934
|
__updateTopGroup(selectedItemsOnTop, selectedItems, opened) {
|
|
935
935
|
if (!selectedItemsOnTop) {
|
|
936
936
|
this._topGroup = [];
|
|
937
|
-
} else if (!opened) {
|
|
937
|
+
} else if (!opened || this.__needToSyncTopGroup()) {
|
|
938
938
|
this._topGroup = [...selectedItems];
|
|
939
939
|
}
|
|
940
940
|
}
|
|
941
941
|
|
|
942
|
+
/** @private */
|
|
943
|
+
__needToSyncTopGroup() {
|
|
944
|
+
// Only sync for object items
|
|
945
|
+
if (!this.itemIdPath) {
|
|
946
|
+
return false;
|
|
947
|
+
}
|
|
948
|
+
return (
|
|
949
|
+
this._topGroup &&
|
|
950
|
+
this._topGroup.some((item) => {
|
|
951
|
+
const selectedItem = this.selectedItems[this._findIndex(item, this.selectedItems, this.itemIdPath)];
|
|
952
|
+
return selectedItem && item !== selectedItem;
|
|
953
|
+
})
|
|
954
|
+
);
|
|
955
|
+
}
|
|
956
|
+
|
|
942
957
|
/** @private */
|
|
943
958
|
__createChip(item) {
|
|
944
959
|
const chip = document.createElement('vaadin-multi-select-combo-box-chip');
|
package/web-types.json
CHANGED