@vaadin/multi-select-combo-box 24.3.1 → 24.4.0-alpha1

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.1",
3
+ "version": "24.4.0-alpha1",
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.1",
41
- "@vaadin/combo-box": "~24.3.1",
42
- "@vaadin/component-base": "~24.3.1",
43
- "@vaadin/field-base": "~24.3.1",
44
- "@vaadin/input-container": "~24.3.1",
45
- "@vaadin/item": "~24.3.1",
46
- "@vaadin/lit-renderer": "~24.3.1",
47
- "@vaadin/overlay": "~24.3.1",
48
- "@vaadin/vaadin-lumo-styles": "~24.3.1",
49
- "@vaadin/vaadin-material-styles": "~24.3.1",
50
- "@vaadin/vaadin-themable-mixin": "~24.3.1"
40
+ "@vaadin/a11y-base": "24.4.0-alpha1",
41
+ "@vaadin/combo-box": "24.4.0-alpha1",
42
+ "@vaadin/component-base": "24.4.0-alpha1",
43
+ "@vaadin/field-base": "24.4.0-alpha1",
44
+ "@vaadin/input-container": "24.4.0-alpha1",
45
+ "@vaadin/item": "24.4.0-alpha1",
46
+ "@vaadin/lit-renderer": "24.4.0-alpha1",
47
+ "@vaadin/overlay": "24.4.0-alpha1",
48
+ "@vaadin/vaadin-lumo-styles": "24.4.0-alpha1",
49
+ "@vaadin/vaadin-material-styles": "24.4.0-alpha1",
50
+ "@vaadin/vaadin-themable-mixin": "24.4.0-alpha1"
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": "b81b3535adec8e4371ceb5d1ba5b12fa2a2abf22"
62
+ "gitHead": "3e2ed41c99d618ff7def2734fd863c21c85775a3"
63
63
  }
@@ -120,6 +120,10 @@ class MultiSelectComboBoxInternal extends ComboBoxDataProviderMixin(ComboBoxMixi
120
120
  };
121
121
  }
122
122
 
123
+ static get observers() {
124
+ return ['_readonlyChanged(readonly)'];
125
+ }
126
+
123
127
  /**
124
128
  * Reference to the clear button element.
125
129
  * @protected
@@ -157,6 +161,11 @@ class MultiSelectComboBoxInternal extends ComboBoxDataProviderMixin(ComboBoxMixi
157
161
  this._toggleElement = this.querySelector('.toggle-button');
158
162
  }
159
163
 
164
+ /** @private */
165
+ _readonlyChanged() {
166
+ this._setDropdownItems(this.filteredItems);
167
+ }
168
+
160
169
  /**
161
170
  * Override combo-box method to group selected
162
171
  * items at the top of the overlay.
@@ -166,12 +175,12 @@ class MultiSelectComboBoxInternal extends ComboBoxDataProviderMixin(ComboBoxMixi
166
175
  */
167
176
  _setDropdownItems(items) {
168
177
  if (this.readonly) {
169
- this._dropdownItems = this.selectedItems;
178
+ super._setDropdownItems(this.selectedItems);
170
179
  return;
171
180
  }
172
181
 
173
182
  if (this.filter || !this.selectedItemsOnTop) {
174
- this._dropdownItems = items;
183
+ super._setDropdownItems(items);
175
184
  return;
176
185
  }
177
186
 
@@ -181,11 +190,11 @@ class MultiSelectComboBoxInternal extends ComboBoxDataProviderMixin(ComboBoxMixi
181
190
  (item) => this._comboBox._findIndex(item, this.topGroup, this.itemIdPath) === -1,
182
191
  );
183
192
 
184
- this._dropdownItems = this.topGroup.concat(filteredItems);
193
+ super._setDropdownItems(this.topGroup.concat(filteredItems));
185
194
  return;
186
195
  }
187
196
 
188
- this._dropdownItems = items;
197
+ super._setDropdownItems(items);
189
198
  }
190
199
 
191
200
  /** @private */
@@ -163,7 +163,7 @@ class MultiSelectComboBox extends ResizeMixin(InputControlMixin(ThemableMixin(El
163
163
 
164
164
  <vaadin-multi-select-combo-box-internal
165
165
  id="comboBox"
166
- items="[[__effectiveItems]]"
166
+ items="[[items]]"
167
167
  item-id-path="[[itemIdPath]]"
168
168
  item-label-path="[[itemLabelPath]]"
169
169
  item-value-path="[[itemValuePath]]"
@@ -177,7 +177,7 @@ class MultiSelectComboBox extends ResizeMixin(InputControlMixin(ThemableMixin(El
177
177
  last-filter="{{_lastFilter}}"
178
178
  loading="{{loading}}"
179
179
  size="{{size}}"
180
- filtered-items="[[__effectiveFilteredItems]]"
180
+ filtered-items="[[filteredItems]]"
181
181
  selected-items="[[selectedItems]]"
182
182
  selected-items-on-top="[[selectedItemsOnTop]]"
183
183
  top-group="[[_topGroup]]"
@@ -486,18 +486,6 @@ class MultiSelectComboBox extends ResizeMixin(InputControlMixin(ThemableMixin(El
486
486
  type: String,
487
487
  },
488
488
 
489
- /** @private */
490
- __effectiveItems: {
491
- type: Array,
492
- computed: '__computeEffectiveItems(items, selectedItems, readonly)',
493
- },
494
-
495
- /** @private */
496
- __effectiveFilteredItems: {
497
- type: Array,
498
- computed: '__computeEffectiveFilteredItems(items, filteredItems, selectedItems, readonly)',
499
- },
500
-
501
489
  /** @private */
502
490
  _overflowItems: {
503
491
  type: Array,
@@ -1266,16 +1254,6 @@ class MultiSelectComboBox extends ResizeMixin(InputControlMixin(ThemableMixin(El
1266
1254
  // and keep the overlay opened when clicking a chip.
1267
1255
  event.preventDefault();
1268
1256
  }
1269
-
1270
- /** @private */
1271
- __computeEffectiveItems(items, selectedItems, readonly) {
1272
- return items && readonly ? selectedItems : items;
1273
- }
1274
-
1275
- /** @private */
1276
- __computeEffectiveFilteredItems(items, filteredItems, selectedItems, readonly) {
1277
- return !items && readonly ? selectedItems : filteredItems;
1278
- }
1279
1257
  }
1280
1258
 
1281
1259
  defineCustomElement(MultiSelectComboBox);
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.1",
4
+ "version": "24.4.0-alpha1",
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.1",
4
+ "version": "24.4.0-alpha1",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {