@vaadin/component-base 24.1.0-alpha1 → 24.1.0-alpha3
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/component-base",
|
|
3
|
-
"version": "24.1.0-
|
|
3
|
+
"version": "24.1.0-alpha3",
|
|
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": "
|
|
45
|
+
"gitHead": "077b4a8e8fff063b9eba4581af81f9e152cb852d"
|
|
46
46
|
}
|
package/src/element-mixin.js
CHANGED
|
@@ -249,42 +249,28 @@ export class IronListAdapter {
|
|
|
249
249
|
this._debouncers._increasePoolIfNeeded.cancel();
|
|
250
250
|
}
|
|
251
251
|
|
|
252
|
-
// Prevent element update while the scroll position is being restored
|
|
253
|
-
this.__preventElementUpdates = true;
|
|
254
|
-
|
|
255
|
-
// Record the scroll position before changing the size
|
|
256
|
-
let fvi; // First visible index
|
|
257
|
-
let fviOffsetBefore; // Scroll offset of the first visible index
|
|
258
|
-
if (size > 0) {
|
|
259
|
-
fvi = this.adjustedFirstVisibleIndex;
|
|
260
|
-
fviOffsetBefore = this.__getIndexScrollOffset(fvi);
|
|
261
|
-
}
|
|
262
|
-
|
|
263
252
|
// Change the size
|
|
264
253
|
this.__size = size;
|
|
265
254
|
|
|
266
|
-
this.
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
if (fviOffsetBefore !== undefined && fviOffsetAfter !== undefined) {
|
|
278
|
-
this._scrollTop += fviOffsetBefore - fviOffsetAfter;
|
|
279
|
-
}
|
|
255
|
+
if (!this._physicalItems) {
|
|
256
|
+
// Not initialized yet
|
|
257
|
+
this._itemsChanged({
|
|
258
|
+
path: 'items',
|
|
259
|
+
});
|
|
260
|
+
this.__preventElementUpdates = true;
|
|
261
|
+
flush();
|
|
262
|
+
this.__preventElementUpdates = false;
|
|
263
|
+
} else {
|
|
264
|
+
// Already initialized, just update _virtualCount
|
|
265
|
+
this._virtualCount = this.items.length;
|
|
280
266
|
}
|
|
281
267
|
|
|
282
268
|
if (!this.elementsContainer.children.length) {
|
|
283
269
|
requestAnimationFrame(() => this._resizeHandler());
|
|
284
270
|
}
|
|
285
271
|
|
|
286
|
-
|
|
287
|
-
//
|
|
272
|
+
// Schedule and flush a resize handler. This will cause a
|
|
273
|
+
// re-render for the elements.
|
|
288
274
|
this._resizeHandler();
|
|
289
275
|
flush();
|
|
290
276
|
}
|