@@ -59,7 +59,7 @@ $ pnpm install svelte-tiny-virtual-list
59
59
</script>
60
60
61
61
<VirtualList width="100%" height={600} itemCount={data.length} itemSize={50}>
62
- {#snippet children ({ style, index })}
62
+ {#snippet item ({ style, index })}
63
63
<div {style}>
64
64
Letter: {data[index]}, Row: #{index}
65
65
</div>
@@ -91,7 +91,7 @@ Also works pretty well with [`svelte-infinite-loading`](https://github.com/jonas
91
91
</script>
92
92
93
93
<VirtualList width="100%" height={600} itemCount={data.length} itemSize={50}>
94
- {#snippet children ({ style, index })}
94
+ {#snippet item ({ style, index })}
95
95
<div {style}>
96
96
Letter: {data[index]}, Row: #{index}
97
97
</div>
@@ -128,7 +128,7 @@ Also works pretty well with [`svelte-infinite-loading`](https://github.com/jonas
128
128
129
129
### Snippets
130
130
131
- - ` children ` - Snippet for each item
131
+ - ` item ` - Snippet for each item
132
132
- Prop: ` { index, style } `
133
133
- ` index: number ` - Item index
134
134
- ` style: string ` - Item style, must be applied to the snippet (look above for example)
@@ -167,7 +167,7 @@ However, if you're passing a function to `itemSize`, that type of comparison is
167
167
itemCount={data.length}
168
168
itemSize={50}
169
169
>
170
- {#snippet children ({ style, index })}
170
+ {#snippet item ({ style, index })}
171
171
<div {style}>
172
172
Letter: {data[index]}, Row: #{index}
173
173
</div>
@@ -188,7 +188,7 @@ You can style the elements of the virtual list like this:
188
188
189
189
<div class="list">
190
190
<VirtualList width="100%" height={600} itemCount={data.length} itemSize={50}>
191
- {#snippet children ({ style, index })}
191
+ {#snippet item ({ style, index })}
192
192
<div {style}>
193
193
Letter: {data[index]}, Row: #{index}
194
194
</div>
0 commit comments