@vaadin/component-base
Advanced tools
Comparing version
{ | ||
"name": "@vaadin/component-base", | ||
"version": "24.8.0", | ||
"version": "24.8.1", | ||
"publishConfig": { | ||
@@ -26,4 +26,3 @@ "access": "public" | ||
"index.js", | ||
"src", | ||
"!src/style-props.js" | ||
"src" | ||
], | ||
@@ -43,8 +42,8 @@ "keywords": [ | ||
"devDependencies": { | ||
"@vaadin/chai-plugins": "^24.8.0", | ||
"@vaadin/test-runner-commands": "^24.8.0", | ||
"@vaadin/chai-plugins": "~24.8.1", | ||
"@vaadin/test-runner-commands": "~24.8.1", | ||
"@vaadin/testing-helpers": "^1.1.0", | ||
"sinon": "^18.0.0" | ||
}, | ||
"gitHead": "2665af61706d16ce398ce55817b70c7bb1ac8b81" | ||
"gitHead": "5e3df45003d43052639d5466c802fd81c3e1427f" | ||
} |
@@ -16,3 +16,3 @@ /** | ||
export function defineCustomElement(CustomElement, version = '24.8.0') { | ||
export function defineCustomElement(CustomElement, version = '24.8.1') { | ||
Object.defineProperty(CustomElement, 'version', { | ||
@@ -19,0 +19,0 @@ get() { |
@@ -602,2 +602,20 @@ /** | ||
/** @override */ | ||
_resizeHandler() { | ||
super._resizeHandler(); | ||
// Fixes an issue where the new items are not created on scroll target resize when the scroll position is around the end. | ||
// See https://github.com/vaadin/flow-components/issues/7307 | ||
const lastIndexVisible = this.adjustedLastVisibleIndex === this.size - 1; | ||
const emptySpace = this._physicalTop - this._scrollPosition; | ||
if (lastIndexVisible && emptySpace > 0) { | ||
const idxAdjustment = Math.ceil(emptySpace / this._physicalAverage); | ||
this._virtualStart = Math.max(0, this._virtualStart - idxAdjustment); | ||
this._physicalStart = Math.max(0, this._physicalStart - idxAdjustment); | ||
// Scroll to end for smoother resize | ||
super.scrollToIndex(this._virtualCount - 1); | ||
this.scrollTarget.scrollTop = this.scrollTarget.scrollHeight - this.scrollTarget.clientHeight; | ||
} | ||
} | ||
/** | ||
@@ -604,0 +622,0 @@ * Work around an iron-list issue with invalid item positioning. |
228270
0.38%6710
0.24%