Skip to content

Commit

Permalink
refactor: {@render footer?.()}
Browse files Browse the repository at this point in the history
  • Loading branch information
orefalo committed Oct 27, 2024
1 parent af7c564 commit 1c2c5fb
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions src/lib/VirtualListNew.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -647,9 +647,7 @@
style={listStyle}>
{#if isTable}
<table bind:this={listInner} class="vtlist-inner" style={listInnerStyle}>
{#if header}
{@render header()}
{/if}
{@render header?.()}
<tbody>
{#if isDisabled}
{#each items as item, index}
Expand All @@ -662,14 +660,10 @@
{/if}
</tbody>
</table>
{#if footer}
{@render footer()}
{/if}
{@render footer?.()}
{:else}
<div bind:this={listInner} class="vtlist-inner" style={listInnerStyle}>
{#if header}
{@render header()}
{/if}
{@render header?.()}
{#if isDisabled}
{#each items as item, index}
{@render vl_slot({ index, item })}
Expand All @@ -679,9 +673,7 @@
{@render vl_slot(item)}
{/each}
{/if}
{#if footer}
{@render footer()}
{/if}
{@render footer?.()}
</div>
{/if}
</div>

0 comments on commit 1c2c5fb

Please sign in to comment.