@vaadin/component-base 24.1.0-beta1 → 24.1.0-beta2

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.1.0-beta1",
3
+ "version": "24.1.0-beta2",
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": "f0ddb6576073a6af05ab29867bc5ec82e334f9d7"
45
+ "gitHead": "83536fcc7d6661a593b2713cb99a8cb74f2fd868"
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.1.0-beta1';
48
+ return '24.1.0-beta2';
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
  }
@@ -281,6 +281,13 @@ export class IronListAdapter {
281
281
  this._virtualCount = this.items.length;
282
282
  }
283
283
 
284
+ // When reducing size while invisible, iron-list does not update items, so
285
+ // their hidden state is not updated and their __lastUpdatedIndex is not
286
+ // reset. In that case force an update here.
287
+ if (!this._isVisible) {
288
+ this._assignModels();
289
+ }
290
+
284
291
  if (!this.elementsContainer.children.length) {
285
292
  requestAnimationFrame(() => this._resizeHandler());
286
293
  }