From 9a8735efa7caac66245382709797707d47b83001 Mon Sep 17 00:00:00 2001 From: Olivier Refalo Date: Fri, 18 Oct 2024 00:13:28 +0400 Subject: [PATCH] refactor: props --- src/lib/new2/VirtualList.svelte | 10 ++++------ src/routes/examples/positioningNew2/code.svelte | 4 +--- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/lib/new2/VirtualList.svelte b/src/lib/new2/VirtualList.svelte index a69c4c4..98541e0 100644 --- a/src/lib/new2/VirtualList.svelte +++ b/src/lib/new2/VirtualList.svelte @@ -86,9 +86,7 @@ // css class: className = '', - style = '', - - ...props + style = '' }: { model: Array; @@ -384,13 +382,13 @@ bind:this={container} bind:clientHeight bind:clientWidth - class="virtual-list-wrapper ${className}" + class="vtlist ${className}" style={listStyle} - {...props}> + > {#if header} {@render header()} {/if} -
+
{#each visibleItems as el} {@render slot({ index: getKey ? getKey(el.index) : el.index, diff --git a/src/routes/examples/positioningNew2/code.svelte b/src/routes/examples/positioningNew2/code.svelte index 6a27f24..3fba15b 100644 --- a/src/routes/examples/positioningNew2/code.svelte +++ b/src/routes/examples/positioningNew2/code.svelte @@ -110,10 +110,8 @@