diff --git a/src/widgets/SampleList/ui/SampleList/SampleList.svelte b/src/widgets/SampleList/ui/SampleList/SampleList.svelte index 418956f..112f3fb 100644 --- a/src/widgets/SampleList/ui/SampleList/SampleList.svelte +++ b/src/widgets/SampleList/ui/SampleList/SampleList.svelte @@ -10,6 +10,7 @@ import { unifiedFontStore, } from '$entities/Font'; import { FontSampler } from '$features/DisplayFont'; +import { controlManager } from '$features/SetupFont'; let text = $state('The quick brown fox jumps over the lazy dog...'); @@ -17,7 +18,10 @@ let text = $state('The quick brown fox jumps over the lazy dog...'); * Load more fonts by moving to the next page */ function loadMore() { - if (!unifiedFontStore.pagination.hasMore || unifiedFontStore.isFetching) { + if ( + !unifiedFontStore.pagination.hasMore + || unifiedFontStore.isFetching + ) { return; } unifiedFontStore.nextPage(); @@ -57,10 +61,12 @@ const displayRange = $derived.by(() => { total={unifiedFontStore.pagination.total} onNearBottom={handleNearBottom} itemHeight={280} + useWindowScroll={true} + weight={controlManager.weight} > - {#snippet children({ item: font, isVisible, proximity, index })} - - + {#snippet children({ item: font, isFullyVisible, isPartiallyVisible, proximity, index })} + + {/snippet}