@vaadin/component-base 25.0.0-alpha4 → 25.0.0-alpha5
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": "25.0.0-
|
|
3
|
+
"version": "25.0.0-alpha5",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -38,10 +38,10 @@
|
|
|
38
38
|
"lit": "^3.0.0"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@vaadin/chai-plugins": "25.0.0-
|
|
42
|
-
"@vaadin/test-runner-commands": "25.0.0-
|
|
41
|
+
"@vaadin/chai-plugins": "25.0.0-alpha5",
|
|
42
|
+
"@vaadin/test-runner-commands": "25.0.0-alpha5",
|
|
43
43
|
"@vaadin/testing-helpers": "^2.0.0",
|
|
44
44
|
"sinon": "^18.0.0"
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "7dc87bb2a3cae81ed53259fa10b58f990d50c6fd"
|
|
47
47
|
}
|
package/src/define.js
CHANGED
|
@@ -13,7 +13,7 @@ function dashToCamelCase(dash) {
|
|
|
13
13
|
|
|
14
14
|
const experimentalMap = {};
|
|
15
15
|
|
|
16
|
-
export function defineCustomElement(CustomElement, version = '25.0.0-
|
|
16
|
+
export function defineCustomElement(CustomElement, version = '25.0.0-alpha5') {
|
|
17
17
|
Object.defineProperty(CustomElement, 'version', {
|
|
18
18
|
get() {
|
|
19
19
|
return version;
|
|
@@ -599,6 +599,24 @@ export class IronListAdapter {
|
|
|
599
599
|
}
|
|
600
600
|
}
|
|
601
601
|
|
|
602
|
+
/** @override */
|
|
603
|
+
_resizeHandler() {
|
|
604
|
+
super._resizeHandler();
|
|
605
|
+
|
|
606
|
+
// Fixes an issue where the new items are not created on scroll target resize when the scroll position is around the end.
|
|
607
|
+
// See https://github.com/vaadin/flow-components/issues/7307
|
|
608
|
+
const lastIndexVisible = this.adjustedLastVisibleIndex === this.size - 1;
|
|
609
|
+
const emptySpace = this._physicalTop - this._scrollPosition;
|
|
610
|
+
if (lastIndexVisible && emptySpace > 0) {
|
|
611
|
+
const idxAdjustment = Math.ceil(emptySpace / this._physicalAverage);
|
|
612
|
+
this._virtualStart = Math.max(0, this._virtualStart - idxAdjustment);
|
|
613
|
+
this._physicalStart = Math.max(0, this._physicalStart - idxAdjustment);
|
|
614
|
+
// Scroll to end for smoother resize
|
|
615
|
+
super.scrollToIndex(this._virtualCount - 1);
|
|
616
|
+
this.scrollTarget.scrollTop = this.scrollTarget.scrollHeight - this.scrollTarget.clientHeight;
|
|
617
|
+
}
|
|
618
|
+
}
|
|
619
|
+
|
|
602
620
|
/**
|
|
603
621
|
* Work around an iron-list issue with invalid item positioning.
|
|
604
622
|
* See https://github.com/vaadin/flow-components/issues/4306
|