@vaadin/component-base 24.0.6 → 24.0.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.
@@ -6,6 +6,7 @@ interface Vaadin {
6
6
  usageStatsChecker?: {
7
7
  maybeGatherAndSend(): void;
8
8
  };
9
+ featureFlags?: Record<string, boolean>;
9
10
  }
10
11
 
11
12
  interface Window {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaadin/component-base",
3
- "version": "24.0.6",
3
+ "version": "24.0.7",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -42,5 +42,5 @@
42
42
  "@vaadin/testing-helpers": "^0.4.0",
43
43
  "sinon": "^13.0.2"
44
44
  },
45
- "gitHead": "25b31075cf2c989de68892c44a3dfd2316c60d30"
45
+ "gitHead": "1152a297704f93c76534e1b5fe76ec8c3e92b881"
46
46
  }
@@ -45,7 +45,7 @@ const registered = new Set();
45
45
  export const ElementMixin = (superClass) =>
46
46
  class VaadinElementMixin extends DirMixin(superClass) {
47
47
  static get version() {
48
- return '24.0.6';
48
+ return '24.0.7';
49
49
  }
50
50
 
51
51
  /** @protected */
@@ -211,19 +211,20 @@ export class SlotController extends EventTarget {
211
211
  }
212
212
 
213
213
  if (newNodes && newNodes.length > 0) {
214
- // Custom node is added, remove the current one.
215
- current.forEach((node) => {
216
- if (node && node.isConnected) {
217
- node.parentNode.removeChild(node);
218
- }
219
- });
220
-
221
214
  if (this.multiple) {
222
- this.nodes = newNodes;
215
+ // Remove default node if exists
216
+ if (this.defaultNode) {
217
+ this.defaultNode.remove();
218
+ }
219
+ this.nodes = [...current, ...newNodes].filter((node) => node !== this.defaultNode);
223
220
  newNodes.forEach((node) => {
224
221
  this.initAddedNode(node);
225
222
  });
226
223
  } else {
224
+ // Remove previous node if exists
225
+ if (this.node) {
226
+ this.node.remove();
227
+ }
227
228
  this.node = newNodes[0];
228
229
  this.initAddedNode(this.node);
229
230
  }
@@ -279,6 +279,13 @@ export class IronListAdapter {
279
279
  }
280
280
  }
281
281
 
282
+ // When reducing size while invisible, iron-list does not update items, so
283
+ // their hidden state is not updated and their __lastUpdatedIndex is not
284
+ // reset. In that case force an update here.
285
+ if (!this._isVisible) {
286
+ this._assignModels();
287
+ }
288
+
282
289
  if (!this.elementsContainer.children.length) {
283
290
  requestAnimationFrame(() => this._resizeHandler());
284
291
  }