@vaadin/multi-select-combo-box 25.0.0-alpha1 → 25.0.0-alpha2
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 +15 -15
- package/src/vaadin-multi-select-combo-box-mixin.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": "25.0.0-
|
|
3
|
+
"version": "25.0.0-alpha2",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -37,27 +37,27 @@
|
|
|
37
37
|
],
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
40
|
-
"@vaadin/a11y-base": "25.0.0-
|
|
41
|
-
"@vaadin/combo-box": "25.0.0-
|
|
42
|
-
"@vaadin/component-base": "25.0.0-
|
|
43
|
-
"@vaadin/field-base": "25.0.0-
|
|
44
|
-
"@vaadin/input-container": "25.0.0-
|
|
45
|
-
"@vaadin/item": "25.0.0-
|
|
46
|
-
"@vaadin/lit-renderer": "25.0.0-
|
|
47
|
-
"@vaadin/overlay": "25.0.0-
|
|
48
|
-
"@vaadin/vaadin-lumo-styles": "25.0.0-
|
|
49
|
-
"@vaadin/vaadin-themable-mixin": "25.0.0-
|
|
40
|
+
"@vaadin/a11y-base": "25.0.0-alpha2",
|
|
41
|
+
"@vaadin/combo-box": "25.0.0-alpha2",
|
|
42
|
+
"@vaadin/component-base": "25.0.0-alpha2",
|
|
43
|
+
"@vaadin/field-base": "25.0.0-alpha2",
|
|
44
|
+
"@vaadin/input-container": "25.0.0-alpha2",
|
|
45
|
+
"@vaadin/item": "25.0.0-alpha2",
|
|
46
|
+
"@vaadin/lit-renderer": "25.0.0-alpha2",
|
|
47
|
+
"@vaadin/overlay": "25.0.0-alpha2",
|
|
48
|
+
"@vaadin/vaadin-lumo-styles": "25.0.0-alpha2",
|
|
49
|
+
"@vaadin/vaadin-themable-mixin": "25.0.0-alpha2",
|
|
50
50
|
"lit": "^3.0.0"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@vaadin/chai-plugins": "25.0.0-
|
|
54
|
-
"@vaadin/test-runner-commands": "25.0.0-
|
|
55
|
-
"@vaadin/testing-helpers": "^
|
|
53
|
+
"@vaadin/chai-plugins": "25.0.0-alpha2",
|
|
54
|
+
"@vaadin/test-runner-commands": "25.0.0-alpha2",
|
|
55
|
+
"@vaadin/testing-helpers": "^2.0.0",
|
|
56
56
|
"sinon": "^18.0.0"
|
|
57
57
|
},
|
|
58
58
|
"web-types": [
|
|
59
59
|
"web-types.json",
|
|
60
60
|
"web-types.lit.json"
|
|
61
61
|
],
|
|
62
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "67ffcd5355cf21ce1b5039c598525109fc4c164b"
|
|
63
63
|
}
|
|
@@ -756,11 +756,26 @@ export const MultiSelectComboBoxMixin = (superClass) =>
|
|
|
756
756
|
__updateTopGroup(selectedItemsOnTop, selectedItems, opened) {
|
|
757
757
|
if (!selectedItemsOnTop) {
|
|
758
758
|
this._topGroup = [];
|
|
759
|
-
} else if (!opened) {
|
|
759
|
+
} else if (!opened || this.__needToSyncTopGroup()) {
|
|
760
760
|
this._topGroup = [...selectedItems];
|
|
761
761
|
}
|
|
762
762
|
}
|
|
763
763
|
|
|
764
|
+
/** @private */
|
|
765
|
+
__needToSyncTopGroup() {
|
|
766
|
+
// Only sync for object items
|
|
767
|
+
if (!this.itemIdPath) {
|
|
768
|
+
return false;
|
|
769
|
+
}
|
|
770
|
+
return (
|
|
771
|
+
this._topGroup &&
|
|
772
|
+
this._topGroup.some((item) => {
|
|
773
|
+
const selectedItem = this.selectedItems[this._findIndex(item, this.selectedItems, this.itemIdPath)];
|
|
774
|
+
return selectedItem && item !== selectedItem;
|
|
775
|
+
})
|
|
776
|
+
);
|
|
777
|
+
}
|
|
778
|
+
|
|
764
779
|
/** @private */
|
|
765
780
|
__createChip(item) {
|
|
766
781
|
const chip = document.createElement('vaadin-multi-select-combo-box-chip');
|
package/web-types.json
CHANGED
package/web-types.lit.json
CHANGED