Skip to content

Commit 9a8735e

Browse files
committed
refactor: props
1 parent 25dc2f1 commit 9a8735e

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

src/lib/new2/VirtualList.svelte

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,7 @@
8686
8787
// css
8888
class: className = '',
89-
style = '',
90-
91-
...props
89+
style = ''
9290
}: {
9391
model: Array<any>;
9492
@@ -384,13 +382,13 @@
384382
bind:this={container}
385383
bind:clientHeight
386384
bind:clientWidth
387-
class="virtual-list-wrapper ${className}"
385+
class="vtlist ${className}"
388386
style={listStyle}
389-
{...props}>
387+
>
390388
{#if header}
391389
{@render header()}
392390
{/if}
393-
<div class="virtual-list-inner" style={listInnerStyle}>
391+
<div class="vtlist-inner" style={listInnerStyle}>
394392
{#each visibleItems as el}
395393
{@render slot({
396394
index: getKey ? getKey(el.index) : el.index,

src/routes/examples/positioningNew2/code.svelte

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,8 @@
110110
<div class="list">
111111
<VirtualList
112112
bind:this={virtualList}
113-
height={500}
114-
width="auto"
113+
style="height:500px"
115114
model={myModel}
116-
modelCount={myModel.length}
117115
itemSize={rowHeights}
118116
{scrollToIndex}
119117
scrollToOffset={scrollOffet}

0 commit comments

Comments
 (0)