We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7fd2654 commit 21d9a46Copy full SHA for 21d9a46
.changeset/two-swans-heal.md
@@ -0,0 +1,5 @@
1
+---
2
+'@tanstack/virtual-core': patch
3
4
+
5
+fix(virtual-core): preserve auto alignment for visible items when scrolling
packages/virtual-core/src/index.ts
@@ -1032,9 +1032,7 @@ export class Virtualizer<
1032
} else if (item.start <= scrollOffset + this.options.scrollPaddingStart) {
1033
align = 'start'
1034
} else {
1035
- // Item is already visible, return current position with concrete alignment
1036
- // to avoid infinite retry loop if measurements change
1037
- return [scrollOffset, 'start'] as const
+ return [scrollOffset, align] as const
1038
}
1039
1040
0 commit comments