Skip to content

Commit

Permalink
Refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
inokawa committed Oct 27, 2024
1 parent a7877b5 commit 2043c7d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/svelte/Virtualizer.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,6 @@
onrangechange,
}: Props = $props();
let containerRef: HTMLDivElement | undefined = $state();
let rerender: StateVersion = $state([]);
const virtualizer = createVirtualizer(
data.length,
itemSize,
Expand All @@ -142,6 +138,10 @@
}
);
let containerRef: HTMLDivElement | undefined = $state();
let rerender: StateVersion = $state([]);
let range = $derived(rerender && virtualizer[GET_RANGE]());
let scrollDirection = $derived(
rerender && virtualizer[GET_SCROLL_DIRECTION]()
Expand Down

0 comments on commit 2043c7d

Please sign in to comment.