Skip to content

Commit 6c5e20b

Browse files
authored
Merge pull request #2490 from opossum-tool/fix-disable-list-scroll-animation-on-first-render
fix: disable list scroll animation on first render
2 parents b168c9e + 9e2f4b4 commit 6c5e20b

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/Frontend/Components/List/List.tsx

+9
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,15 @@ export function List({
7171
<Virtuoso
7272
ref={ref}
7373
fixedItemHeight={cardHeight}
74+
initialTopMostItemIndex={
75+
window?.process?.env.JEST_WORKER_ID // https://github.com/petyosi/react-virtuoso/issues/1001
76+
? undefined
77+
: {
78+
index: indexToScrollTo,
79+
behavior: 'auto',
80+
align: 'center',
81+
}
82+
}
7483
totalCount={length}
7584
isScrolling={setIsScrolling}
7685
style={{

0 commit comments

Comments
 (0)