@vaadin/component-base
Advanced tools
+4
-4
| { | ||
| "name": "@vaadin/component-base", | ||
| "version": "25.0.5", | ||
| "version": "25.0.6", | ||
| "publishConfig": { | ||
@@ -40,8 +40,8 @@ "access": "public" | ||
| "devDependencies": { | ||
| "@vaadin/chai-plugins": "~25.0.5", | ||
| "@vaadin/test-runner-commands": "~25.0.5", | ||
| "@vaadin/chai-plugins": "~25.0.6", | ||
| "@vaadin/test-runner-commands": "~25.0.6", | ||
| "@vaadin/testing-helpers": "^2.0.0", | ||
| "sinon": "^21.0.0" | ||
| }, | ||
| "gitHead": "f9de924c232acc7b113e9f7f48368e8ca8105f81" | ||
| "gitHead": "bcf72177eb200c88e07e6458e1de37e32ce18f88" | ||
| } |
+1
-1
@@ -16,3 +16,3 @@ /** | ||
| export function defineCustomElement(CustomElement, version = '25.0.5') { | ||
| export function defineCustomElement(CustomElement, version = '25.0.6') { | ||
| Object.defineProperty(CustomElement, 'version', { | ||
@@ -19,0 +19,0 @@ get() { |
@@ -353,4 +353,3 @@ /** | ||
| // Prevent element update while the scroll position is being restored | ||
| this.__preventElementUpdates = true; | ||
| const shouldRestoreScrollPosition = size > 0 && this._scrollTop > 0; | ||
@@ -360,3 +359,3 @@ // Record the scroll position before changing the size | ||
| let fviOffsetBefore; // Scroll offset of the first visible index | ||
| if (size > 0) { | ||
| if (shouldRestoreScrollPosition) { | ||
| fvi = this.adjustedFirstVisibleIndex; | ||
@@ -369,2 +368,9 @@ fviOffsetBefore = this.__getIndexScrollOffset(fvi); | ||
| // Attempts to update elements during _itemsChanged and the subsequent | ||
| // scrollToIndex should be skipped when the scroll position needs to be | ||
| // restored (scroll position > 0 before size change). Otherwise, these | ||
| // element updates can cause the component to make incorrect server | ||
| // requests in its updateElement callback. | ||
| this.__preventElementUpdates = shouldRestoreScrollPosition; | ||
| this._itemsChanged({ | ||
@@ -375,4 +381,3 @@ path: 'items', | ||
| // Try to restore the scroll position if the new size is larger than 0 | ||
| if (size > 0) { | ||
| if (shouldRestoreScrollPosition) { | ||
| fvi = Math.min(fvi, size - 1); | ||
@@ -403,5 +408,12 @@ // Note, calling scrollToIndex also updates the virtual index offset, | ||
| // Schedule and flush a resize handler | ||
| // Re-render items once the scroll position has been restored. | ||
| // This call also updates the cached scrollTarget height and | ||
| // rechecks whether more virtual elements are needed, since the | ||
| // scrollTarget's height may change after the scrollContainer's | ||
| // height is determined and set, requiring more elements to fill | ||
| // the viewport (e.g., in combo-box, where the scroller height | ||
| // depends on the height of #selector element in the shadow DOM). | ||
| this._resizeHandler(); | ||
| flush(); | ||
| // Schedule an update to ensure item positions are correct after subsequent size changes | ||
@@ -408,0 +420,0 @@ // Fix for https://github.com/vaadin/flow-components/issues/6269 |
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
239696
0.32%6773
0.15%