File tree Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Original file line number Diff line number Diff line change 22 import { VirtualList } from ' svelte-virtuallists' ;
33 import { getRandomSushi } from ' ../sushi' ;
44
5- const myModel = new Array (10000 ).fill (1 ).map ((v , i ) => {
5+ const myModel = new Array (10000 ).fill (1 ).map (() => {
66 return { text: getRandomSushi () };
77 });
88 </script >
Original file line number Diff line number Diff line change 22 import { VirtualList , type SizingCalculatorFn , type VLSlotSignature } from ' svelte-virtuallists' ;
33 import { getRandomSushi } from ' ../sushi' ;
44
5- const myModel = new Array (10000 ).fill (1 ).map ((v , i ) => {
5+ const myModel = new Array (10000 ).fill (1 ).map (() => {
66 return { text: getRandomSushi () };
77 });
88
Original file line number Diff line number Diff line change 88 </script >
99
1010<VirtualList items ={myModel } style =" height:600px" >
11- {#snippet vl_slot ({ index , item }: VLSlotSignature < (typeof myModel )[0 ]> )}
11+ {#snippet vl_slot ({ item }: VLSlotSignature < (typeof myModel )[0 ]> )}
1212 <div style =" border: 1px solid rgb(204, 204, 204)" >
1313 {item .text }
1414 </div >
You can’t perform that action at this time.
0 commit comments