@vaadin/multi-select-combo-box 24.3.0-alpha8 → 24.3.0-alpha9

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaadin/multi-select-combo-box",
3
- "version": "24.3.0-alpha8",
3
+ "version": "24.3.0-alpha9",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -37,17 +37,17 @@
37
37
  ],
38
38
  "dependencies": {
39
39
  "@polymer/polymer": "^3.0.0",
40
- "@vaadin/a11y-base": "24.3.0-alpha8",
41
- "@vaadin/combo-box": "24.3.0-alpha8",
42
- "@vaadin/component-base": "24.3.0-alpha8",
43
- "@vaadin/field-base": "24.3.0-alpha8",
44
- "@vaadin/input-container": "24.3.0-alpha8",
45
- "@vaadin/item": "24.3.0-alpha8",
46
- "@vaadin/lit-renderer": "24.3.0-alpha8",
47
- "@vaadin/overlay": "24.3.0-alpha8",
48
- "@vaadin/vaadin-lumo-styles": "24.3.0-alpha8",
49
- "@vaadin/vaadin-material-styles": "24.3.0-alpha8",
50
- "@vaadin/vaadin-themable-mixin": "24.3.0-alpha8"
40
+ "@vaadin/a11y-base": "24.3.0-alpha9",
41
+ "@vaadin/combo-box": "24.3.0-alpha9",
42
+ "@vaadin/component-base": "24.3.0-alpha9",
43
+ "@vaadin/field-base": "24.3.0-alpha9",
44
+ "@vaadin/input-container": "24.3.0-alpha9",
45
+ "@vaadin/item": "24.3.0-alpha9",
46
+ "@vaadin/lit-renderer": "24.3.0-alpha9",
47
+ "@vaadin/overlay": "24.3.0-alpha9",
48
+ "@vaadin/vaadin-lumo-styles": "24.3.0-alpha9",
49
+ "@vaadin/vaadin-material-styles": "24.3.0-alpha9",
50
+ "@vaadin/vaadin-themable-mixin": "24.3.0-alpha9"
51
51
  },
52
52
  "devDependencies": {
53
53
  "@esm-bundle/chai": "^4.3.4",
@@ -59,5 +59,5 @@
59
59
  "web-types.json",
60
60
  "web-types.lit.json"
61
61
  ],
62
- "gitHead": "03b2f1c55aadb86b15ad96c7e7dcb059e5fc0604"
62
+ "gitHead": "ea39f40613cb73b237d08d4c48b890ee7d1844cb"
63
63
  }
@@ -165,25 +165,22 @@ class MultiSelectComboBoxInternal extends ComboBoxDataProviderMixin(ComboBoxMixi
165
165
  * @override
166
166
  */
167
167
  _setDropdownItems(items) {
168
- if (this.readonly || !this.groupSelectedItems) {
168
+ if (this.filter || this.readonly || !this.groupSelectedItems) {
169
169
  this._dropdownItems = items;
170
170
  return;
171
171
  }
172
172
 
173
- if (this.topGroup) {
174
- const filteredTopItems = [];
175
- const filteredItems = [];
176
-
177
- (items || []).forEach((item) => {
178
- if (this.topGroup.some((selectedItem) => this._getItemValue(item) === this._getItemValue(selectedItem))) {
179
- filteredTopItems.push(item);
180
- } else {
181
- filteredItems.push(item);
182
- }
183
- });
173
+ if (items && items.length && this.topGroup && this.topGroup.length) {
174
+ // Filter out items included to the top group.
175
+ const filteredItems = items.filter(
176
+ (item) => !this.topGroup.some((selectedItem) => this._getItemValue(item) === this._getItemValue(selectedItem)),
177
+ );
184
178
 
185
- this._dropdownItems = [...filteredTopItems, ...filteredItems];
179
+ this._dropdownItems = this.topGroup.concat(filteredItems);
180
+ return;
186
181
  }
182
+
183
+ this._dropdownItems = items;
187
184
  }
188
185
 
189
186
  /** @private */
@@ -67,6 +67,10 @@ const multiSelectComboBox = css`
67
67
  caret-color: var(--lumo-body-text-color) !important;
68
68
  }
69
69
 
70
+ [part='label'] {
71
+ flex-shrink: 0;
72
+ }
73
+
70
74
  /* Override input-container styles */
71
75
  ::slotted([slot='chip']),
72
76
  ::slotted([slot='overflow']) {
package/web-types.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/multi-select-combo-box",
4
- "version": "24.3.0-alpha8",
4
+ "version": "24.3.0-alpha9",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/multi-select-combo-box",
4
- "version": "24.3.0-alpha8",
4
+ "version": "24.3.0-alpha9",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {