@@ -59,7 +59,7 @@ $ pnpm install svelte-tiny-virtual-list
5959</script>
6060
6161<VirtualList width="100%" height={600} itemCount={data.length} itemSize={50}>
62- {#snippet children ({ style, index })}
62+ {#snippet item ({ style, index })}
6363 <div {style}>
6464 Letter: {data[index]}, Row: #{index}
6565 </div>
@@ -91,7 +91,7 @@ Also works pretty well with [`svelte-infinite-loading`](https://github.com/jonas
9191</script>
9292
9393<VirtualList width="100%" height={600} itemCount={data.length} itemSize={50}>
94- {#snippet children ({ style, index })}
94+ {#snippet item ({ style, index })}
9595 <div {style}>
9696 Letter: {data[index]}, Row: #{index}
9797 </div>
@@ -128,7 +128,7 @@ Also works pretty well with [`svelte-infinite-loading`](https://github.com/jonas
128128
129129### Snippets
130130
131- - ` children ` - Snippet for each item
131+ - ` item ` - Snippet for each item
132132 - Prop: ` { index, style } `
133133 - ` index: number ` - Item index
134134 - ` 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
167167 itemCount={data.length}
168168 itemSize={50}
169169>
170- {#snippet children ({ style, index })}
170+ {#snippet item ({ style, index })}
171171 <div {style}>
172172 Letter: {data[index]}, Row: #{index}
173173 </div>
@@ -188,7 +188,7 @@ You can style the elements of the virtual list like this:
188188
189189<div class="list">
190190 <VirtualList width="100%" height={600} itemCount={data.length} itemSize={50}>
191- {#snippet children ({ style, index })}
191+ {#snippet item ({ style, index })}
192192 <div {style}>
193193 Letter: {data[index]}, Row: #{index}
194194 </div>
0 commit comments