diff --git a/src/shared/ui/VirtualList/VirtualList.svelte b/src/shared/ui/VirtualList/VirtualList.svelte index 474f450..3c6bf35 100644 --- a/src/shared/ui/VirtualList/VirtualList.svelte +++ b/src/shared/ui/VirtualList/VirtualList.svelte @@ -6,9 +6,11 @@ - Keyboard navigation (ArrowUp/Down, Home, End) - Fixed or dynamic item heights - ARIA listbox/option pattern with single tab stop + - Custom shadcn ScrollArea scrollbar --> -
{ - // Prevent the browser from jumping the scroll when an inner element gets focus - e.preventDefault(); - })} + -
-
- - {#each virtualizer.items as item (item.key)} -
- {#if item.index < items.length} - {@render children({ +
+ {#each virtualizer.items as item (item.key)} +
+ {#if item.index < items.length} + {@render children({ item: items[item.index], index: item.index, isVisible: item.isVisible, proximity: item.proximity, })} - {/if} -
- {/each} -
+ {/if} +
+ {/each} +
+