@@ -15,26 +15,26 @@ yarn add @sveltejs/svelte-virtual-list
1515<VirtualList items ={{things}} component ={{RowComponent}} />
1616
1717<script >
18- import VirtualList from ' @sveltejs/svelte-virtual-list' ;
19- import RowComponent from ' ./RowComponent.html' ;
20-
21- export default {
22- components: { VirtualList },
23-
24- data () {
25- return {
26- things: [
27- // these can be any values you like
28- { name: ' one' , value: 1 },
29- { name: ' two' , value: 2 },
30- { name: ' three' , value: 3 },
31- // ...
32- { name: ' six thousand and ninety-two' , value: 6092 }
33- ],
34- RowComponent
35- };
36- }
37- };
18+ import VirtualList from ' @sveltejs/svelte-virtual-list' ;
19+ import RowComponent from ' ./RowComponent.html' ;
20+
21+ export default {
22+ components: { VirtualList },
23+
24+ data () {
25+ return {
26+ things: [
27+ // these can be any values you like
28+ { name: ' one' , value: 1 },
29+ { name: ' two' , value: 2 },
30+ { name: ' three' , value: 3 },
31+ // ...
32+ { name: ' six thousand and ninety-two' , value: 6092 }
33+ ],
34+ RowComponent
35+ };
36+ }
37+ };
3838 </script >
3939```
4040
@@ -43,8 +43,8 @@ The component constructor you supply to `<VirtualList>` will be instantiated for
4343``` html
4444<!-- RowComponent.html -->
4545<div >
46- <strong >{{row.value}}</strong >
47- <span >{{row.name}}</span >
46+ <strong >{{row.value}}</strong >
47+ <span >{{row.name}}</span >
4848</div >
4949```
5050
0 commit comments