Skip to content

Commit ae7f1c0

Browse files
committed
Revert "Adapt default logic to adjust scroll position only on backward scrolling (#1002)"
This reverts commit b3b7e7d.
1 parent 545c3c4 commit ae7f1c0

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

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)