Skip to content

Commit 8ecbd3c

Browse files
committed
fix: add zclass and zstyle to the component
1 parent 972c22f commit 8ecbd3c

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/lib/VirtualList.svelte

+7-1
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,10 @@
7171
onVisibleRangeUpdate,
7272
onAfterScroll,
7373
74+
// dom
75+
zclass = '',
76+
zstyle = '',
77+
7478
...props
7579
}: {
7680
height: number | string;
@@ -94,6 +98,8 @@
9498
// events
9599
onVisibleRangeUpdate?: (range: VirtualRangeEvent) => void;
96100
onAfterScroll?: (event: AfterScrollEvent) => void;
101+
zclass?: string;
102+
zstyle?: string;
97103
} = $props();
98104
99105
const SCROLL_PROP = {
@@ -381,7 +387,7 @@
381387
}
382388
</script>
383389

384-
<div bind:this={container} class="virtual-list-wrapper" style={wrapperStyle} {...props}>
390+
<div bind:this={container} class="virtual-list-wrapper ${zclass}" style={wrapperStyle} {...props}>
385391
{#if header}
386392
{@render header()}
387393
{/if}

0 commit comments

Comments
 (0)