검색 기능 구현

This commit is contained in:
static
2026-01-15 15:11:03 +09:00
parent 96d5397cb5
commit 37bd6a9315
26 changed files with 757 additions and 35 deletions

View File

@@ -6,13 +6,22 @@
interface Props {
class?: ClassValue;
count: number;
estimateItemHeight: (index: number) => number;
getItemKey?: (index: number) => string | number;
item: Snippet<[index: number]>;
itemHeight: (index: number) => number;
itemGap?: number;
placeholder?: Snippet;
}
let { class: className, count, item, itemHeight, itemGap, placeholder }: Props = $props();
let {
class: className,
count,
estimateItemHeight,
getItemKey,
item,
itemGap,
placeholder,
}: Props = $props();
let element: HTMLElement | undefined = $state();
let scrollMargin = $state(0);
@@ -20,8 +29,9 @@
let virtualizer = $derived(
createWindowVirtualizer({
count,
estimateSize: itemHeight,
estimateSize: estimateItemHeight,
gap: itemGap,
getItemKey: getItemKey,
scrollMargin,
}),
);