Skip to content

Commit

Permalink
fix: add zclass and zstyle to the component
Browse files Browse the repository at this point in the history
  • Loading branch information
orefalo committed Jun 22, 2024
1 parent 972c22f commit 8ecbd3c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/lib/VirtualList.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@
onVisibleRangeUpdate,
onAfterScroll,
// dom
zclass = '',
zstyle = '',

Check warning on line 76 in src/lib/VirtualList.svelte

View workflow job for this annotation

GitHub Actions / tests

'zstyle' is assigned a value but never used. Allowed unused vars must match /^_/u
...props
}: {
height: number | string;
Expand All @@ -94,6 +98,8 @@
// events
onVisibleRangeUpdate?: (range: VirtualRangeEvent) => void;
onAfterScroll?: (event: AfterScrollEvent) => void;
zclass?: string;
zstyle?: string;
} = $props();
const SCROLL_PROP = {
Expand Down Expand Up @@ -381,7 +387,7 @@
}
</script>

<div bind:this={container} class="virtual-list-wrapper" style={wrapperStyle} {...props}>
<div bind:this={container} class="virtual-list-wrapper ${zclass}" style={wrapperStyle} {...props}>
{#if header}
{@render header()}
{/if}
Expand Down

0 comments on commit 8ecbd3c

Please sign in to comment.