Skip to content

Commit 73fa867

Browse files
authored
Revert "Adapt default logic to adjust scroll position only on backward scrolling (#1002)" (#1026)
1 parent 545c3c4 commit 73fa867

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

.changeset/honest-snakes-change.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@tanstack/virtual-core': patch
3+
---
4+
5+
Revert "Adapt default logic to adjust scroll position only on backward scrolling (#1002)"

packages/virtual-core/src/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -814,8 +814,7 @@ export class Virtualizer<
814814
if (
815815
this.shouldAdjustScrollPositionOnItemSizeChange !== undefined
816816
? this.shouldAdjustScrollPositionOnItemSizeChange(item, delta, this)
817-
: this.scrollDirection === 'backward' &&
818-
item.start < this.getScrollOffset() + this.scrollAdjustments
817+
: item.start < this.getScrollOffset() + this.scrollAdjustments
819818
) {
820819
if (process.env.NODE_ENV !== 'production' && this.options.debug) {
821820
console.info('correction', delta)

0 commit comments

Comments
 (0)