Skip to content

Commit

Permalink
refactor: props
Browse files Browse the repository at this point in the history
  • Loading branch information
orefalo committed Oct 17, 2024
1 parent 25dc2f1 commit 9a8735e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
10 changes: 4 additions & 6 deletions src/lib/new2/VirtualList.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,7 @@
// css
class: className = '',
style = '',
...props
style = ''
}: {
model: Array<any>;
Expand Down Expand Up @@ -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}
<div class="virtual-list-inner" style={listInnerStyle}>
<div class="vtlist-inner" style={listInnerStyle}>
{#each visibleItems as el}
{@render slot({
index: getKey ? getKey(el.index) : el.index,
Expand Down
4 changes: 1 addition & 3 deletions src/routes/examples/positioningNew2/code.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,8 @@
<div class="list">
<VirtualList
bind:this={virtualList}
height={500}
width="auto"
style="height:500px"
model={myModel}
modelCount={myModel.length}
itemSize={rowHeights}
{scrollToIndex}
scrollToOffset={scrollOffet}
Expand Down

0 comments on commit 9a8735e

Please sign in to comment.