@vaadin/multi-select-combo-box 24.7.6 → 24.7.7
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 +26 -8
- 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": "24.7.
|
|
3
|
+
"version": "24.7.7",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -39,22 +39,22 @@
|
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
41
41
|
"@polymer/polymer": "^3.0.0",
|
|
42
|
-
"@vaadin/a11y-base": "~24.7.
|
|
43
|
-
"@vaadin/combo-box": "~24.7.
|
|
44
|
-
"@vaadin/component-base": "~24.7.
|
|
45
|
-
"@vaadin/field-base": "~24.7.
|
|
46
|
-
"@vaadin/input-container": "~24.7.
|
|
47
|
-
"@vaadin/item": "~24.7.
|
|
48
|
-
"@vaadin/lit-renderer": "~24.7.
|
|
49
|
-
"@vaadin/overlay": "~24.7.
|
|
50
|
-
"@vaadin/vaadin-lumo-styles": "~24.7.
|
|
51
|
-
"@vaadin/vaadin-material-styles": "~24.7.
|
|
52
|
-
"@vaadin/vaadin-themable-mixin": "~24.7.
|
|
42
|
+
"@vaadin/a11y-base": "~24.7.7",
|
|
43
|
+
"@vaadin/combo-box": "~24.7.7",
|
|
44
|
+
"@vaadin/component-base": "~24.7.7",
|
|
45
|
+
"@vaadin/field-base": "~24.7.7",
|
|
46
|
+
"@vaadin/input-container": "~24.7.7",
|
|
47
|
+
"@vaadin/item": "~24.7.7",
|
|
48
|
+
"@vaadin/lit-renderer": "~24.7.7",
|
|
49
|
+
"@vaadin/overlay": "~24.7.7",
|
|
50
|
+
"@vaadin/vaadin-lumo-styles": "~24.7.7",
|
|
51
|
+
"@vaadin/vaadin-material-styles": "~24.7.7",
|
|
52
|
+
"@vaadin/vaadin-themable-mixin": "~24.7.7",
|
|
53
53
|
"lit": "^3.0.0"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
|
-
"@vaadin/chai-plugins": "~24.7.
|
|
57
|
-
"@vaadin/test-runner-commands": "~24.7.
|
|
56
|
+
"@vaadin/chai-plugins": "~24.7.7",
|
|
57
|
+
"@vaadin/test-runner-commands": "~24.7.7",
|
|
58
58
|
"@vaadin/testing-helpers": "^1.1.0",
|
|
59
59
|
"sinon": "^18.0.0"
|
|
60
60
|
},
|
|
@@ -62,5 +62,5 @@
|
|
|
62
62
|
"web-types.json",
|
|
63
63
|
"web-types.lit.json"
|
|
64
64
|
],
|
|
65
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "e047a26c58d3014c01e5ea803a23f12cac747efc"
|
|
66
66
|
}
|
|
@@ -758,11 +758,26 @@ export const MultiSelectComboBoxMixin = (superClass) =>
|
|
|
758
758
|
__updateTopGroup(selectedItemsOnTop, selectedItems, opened) {
|
|
759
759
|
if (!selectedItemsOnTop) {
|
|
760
760
|
this._topGroup = [];
|
|
761
|
-
} else if (!opened) {
|
|
761
|
+
} else if (!opened || this.__needToSyncTopGroup()) {
|
|
762
762
|
this._topGroup = [...selectedItems];
|
|
763
763
|
}
|
|
764
764
|
}
|
|
765
765
|
|
|
766
|
+
/** @private */
|
|
767
|
+
__needToSyncTopGroup() {
|
|
768
|
+
// Only sync for object items
|
|
769
|
+
if (!this.itemIdPath) {
|
|
770
|
+
return false;
|
|
771
|
+
}
|
|
772
|
+
return (
|
|
773
|
+
this._topGroup &&
|
|
774
|
+
this._topGroup.some((item) => {
|
|
775
|
+
const selectedItem = this.selectedItems[this._findIndex(item, this.selectedItems, this.itemIdPath)];
|
|
776
|
+
return selectedItem && item !== selectedItem;
|
|
777
|
+
})
|
|
778
|
+
);
|
|
779
|
+
}
|
|
780
|
+
|
|
766
781
|
/** @private */
|
|
767
782
|
__createChip(item) {
|
|
768
783
|
const chip = document.createElement('vaadin-multi-select-combo-box-chip');
|
|
@@ -877,14 +892,17 @@ export const MultiSelectComboBoxMixin = (superClass) =>
|
|
|
877
892
|
this.insertBefore(chip, refNode);
|
|
878
893
|
|
|
879
894
|
// When auto expanding vertically, no need to measure remaining width
|
|
880
|
-
if (!this.autoExpandVertically
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
chip
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
895
|
+
if (!this.autoExpandVertically) {
|
|
896
|
+
if (this.$.chips.clientWidth > remainingWidth) {
|
|
897
|
+
// If there is no more space for chips, or if there is at least one
|
|
898
|
+
// chip already shown, collapse all remaining chips to the overflow
|
|
899
|
+
if (remainingWidth < chipMinWidth || refNode !== null) {
|
|
900
|
+
chip.remove();
|
|
901
|
+
break;
|
|
902
|
+
}
|
|
887
903
|
}
|
|
904
|
+
|
|
905
|
+
chip.style.maxWidth = `${remainingWidth}px`;
|
|
888
906
|
}
|
|
889
907
|
|
|
890
908
|
items.pop();
|
package/web-types.json
CHANGED