Skip to content

Commit 581941a

Browse files
authored
tests(solid-router): Enable e2e scroll restoration test (#5298)
* enabled solid-rotuer e2e scroll restoration test * fix solid-router e2e scroll restoration test
1 parent f382bd2 commit 581941a

File tree

3 files changed

+57
-2
lines changed

3 files changed

+57
-2
lines changed

e2e/solid-router/basic-scroll-restoration/src/main.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,10 @@ function ByElementComponent() {
114114
})
115115

116116
// Let's use TanStack Virtual to virtualize some content!
117-
const virtualizerParentRef: any = null
117+
let virtualizerParentRef: HTMLDivElement | undefined
118118
const virtualizer = createVirtualizer({
119119
count: 10000,
120-
getScrollElement: () => virtualizerParentRef?.current,
120+
getScrollElement: () => virtualizerParentRef ?? null,
121121
estimateSize: () => 100,
122122
// We pass the scrollY from the scroll restoration entry to the virtualizer
123123
// as the initial offset

pnpm-lock.yaml

Lines changed: 55 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)