@vaadin/component-base 23.6.0 → 23.6.2
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": "23.6.
|
|
3
|
+
"version": "23.6.2",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -42,5 +42,5 @@
|
|
|
42
42
|
"@vaadin/testing-helpers": "^0.3.2",
|
|
43
43
|
"sinon": "^13.0.2"
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "2db3b5416b9ba6ee342720970150e2d31cd634cd"
|
|
46
46
|
}
|
package/src/element-mixin.js
CHANGED
|
@@ -438,6 +438,24 @@ export class IronListAdapter {
|
|
|
438
438
|
}
|
|
439
439
|
}
|
|
440
440
|
|
|
441
|
+
/** @override */
|
|
442
|
+
_resizeHandler() {
|
|
443
|
+
super._resizeHandler();
|
|
444
|
+
|
|
445
|
+
// Fixes an issue where the new items are not created on scroll target resize when the scroll position is around the end.
|
|
446
|
+
// See https://github.com/vaadin/flow-components/issues/7307
|
|
447
|
+
const lastIndexVisible = this.adjustedLastVisibleIndex === this.size - 1;
|
|
448
|
+
const emptySpace = this._physicalTop - this._scrollPosition;
|
|
449
|
+
if (lastIndexVisible && emptySpace > 0) {
|
|
450
|
+
const idxAdjustment = Math.ceil(emptySpace / this._physicalAverage);
|
|
451
|
+
this._virtualStart = Math.max(0, this._virtualStart - idxAdjustment);
|
|
452
|
+
this._physicalStart = Math.max(0, this._physicalStart - idxAdjustment);
|
|
453
|
+
// Scroll to end for smoother resize
|
|
454
|
+
super.scrollToIndex(this._virtualCount - 1);
|
|
455
|
+
this.scrollTarget.scrollTop = this.scrollTarget.scrollHeight - this.scrollTarget.clientHeight;
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
|
|
441
459
|
/**
|
|
442
460
|
* Work around an iron-list issue with invalid item positioning.
|
|
443
461
|
* See https://github.com/vaadin/flow-components/issues/4306
|