|
1 | 1 | <div class="list-sample"> |
2 | 2 | <article class="sample-column"> |
3 | | - <span>Vertical Virtualization</span> |
4 | | - <br/> |
5 | | - <div style='height:500px; position: relative; overflow: hidden'> |
6 | | - <ng-template igxFor let-item [igxForOf]="data" #virtDirVertical |
7 | | - [igxForScrollOrientation]="'vertical'" |
8 | | - [igxForContainerSize]='"500px"' |
9 | | - [igxForItemSize]='itemSize' |
10 | | - let-rowIndex="index"> |
11 | | - <div [style.height]='itemSize'>{{rowIndex}} : {{item.text}}</div> |
12 | | - </ng-template> |
13 | | - </div> |
14 | | - <button (click)="scrNextRow()">Scroll Next Row</button> |
15 | | - <button (click)="scrPrevRow()">Scroll Prev Row</button> |
16 | | - <button (click)="scrNextPage()">Scroll Next Page</button> |
17 | | - <button (click)="scrPrevPage()">Scroll Prev Page</button> |
18 | | - <div><input type='number' #input/><button (click)='scrScrollTo(input.value)'>Go To Index</button></div> |
19 | | - <button (click)="verticalVisibleItemCount()">Get visible item count</button> |
20 | | - <button (click)="changeItemSize()">Change Item Size</button> |
| 3 | + <span>Vertical Virtualization</span> |
| 4 | + <br/> |
| 5 | + <div style='height:500px; position: relative; overflow: hidden'> |
| 6 | + <ng-template igxFor let-item [igxForOf]="data" #virtDirVertical |
| 7 | + [igxForScrollOrientation]="'vertical'" |
| 8 | + [igxForContainerSize]='"500px"' |
| 9 | + [igxForItemSize]='itemSize' |
| 10 | + let-rowIndex="index"> |
| 11 | + <div [style.height]='itemSize'>{{rowIndex}} : {{item.text}}</div> |
| 12 | + </ng-template> |
| 13 | + </div> |
| 14 | + <button (click)="scrNextRow()">Scroll Next Row</button> |
| 15 | + <button (click)="scrPrevRow()">Scroll Prev Row</button> |
| 16 | + <button (click)="scrNextPage()">Scroll Next Page</button> |
| 17 | + <button (click)="scrPrevPage()">Scroll Prev Page</button> |
| 18 | + <div><input type='number' #input/><button (click)='scrScrollTo(input.value)'>Go To Index</button></div> |
| 19 | + <button (click)="verticalVisibleItemCount()">Get visible item count</button> |
| 20 | + <button (click)="changeItemSize()">Change Item Size</button> |
21 | 21 | </article> |
22 | 22 | <article class="sample-column"> |
23 | | - <span>Horizontal Virtualization</span> |
24 | | - <br/> |
25 | | - <table> |
26 | | - <tbody style='display:grid;'> |
27 | | - <tr style='width:500px; height:100px;'> |
28 | | - <div class='overflowContainer'> |
29 | | - <ng-template igxFor let-item [igxForOf]="data" #virtDirHorizontal |
30 | | - [igxForScrollOrientation]="'horizontal'" |
31 | | - [igxForContainerSize]='"500px"' |
32 | | - [igxForItemSize]='"200px"' |
33 | | - let-rowIndex="index"> |
34 | | - <td [style.width.px]='200' [style.min-width.px]='200' style='height:100px;'>{{rowIndex}} : {{item.text}}</td> |
35 | | - </ng-template> |
36 | | - </div> |
37 | | - </tr> |
38 | | - </tbody> |
39 | | - </table> |
40 | | - <br/> |
41 | | - <button (click)="scrNextCol()">Scroll Next Column</button> |
42 | | - <button (click)="scrPrevCol()">Scroll Prev Column</button> |
43 | | - <button (click)="scrNextHorizontalPage()">Scroll Next Horizontal Page</button> |
44 | | - <button (click)="scrPrevHorizontalPage()">Scroll Prev Horizontal Page</button> |
45 | | - <input (input)="scrHorizontalScrollTo($event.target.value)" placeholder="scroll to index"/> |
46 | | - <button (click)="horizontalVisibleItemCount()">Get visible item count</button> |
| 23 | + <span>Horizontal Virtualization</span> |
| 24 | + <br/> |
| 25 | + <table> |
| 26 | + <tbody style='display:grid;'> |
| 27 | + <tr style='width:500px; height:100px;'> |
| 28 | + <div style='position: relative; overflow: hidden'> |
| 29 | + <ng-template igxFor let-item [igxForOf]="data" #virtDirHorizontal |
| 30 | + [igxForScrollOrientation]="'horizontal'" |
| 31 | + [igxForContainerSize]='"500px"' |
| 32 | + let-rowIndex="index"> |
| 33 | + <td [style.width.px]='item.width' [style.min-width.px]='item.width' style='height:100px;'>{{rowIndex}} : {{item.text}}</td> |
| 34 | + </ng-template> |
| 35 | + </div> |
| 36 | + </tr> |
| 37 | + </tbody> |
| 38 | + </table> |
| 39 | + <button (click)="scrNextCol()">Scroll Next Column</button> |
| 40 | + <button (click)="scrPrevCol()">Scroll Prev Column</button> |
| 41 | + <button (click)="scrNextHorizontalPage()">Scroll Next Horizontal Page</button> |
| 42 | + <button (click)="scrPrevHorizontalPage()">Scroll Prev Horizontal Page</button> |
| 43 | + <input (input)="scrHorizontalScrollTo($event.target.value)" placeholder="scroll to index"/> |
| 44 | + <button (click)="horizontalVisibleItemCount()">Get visible item count</button> |
47 | 45 | </article> |
48 | 46 | <article class="sample-column"> |
49 | 47 | <span>Variable heights</span> |
50 | 48 | <br/> |
51 | 49 | <div style='height:500px; position: relative; overflow: hidden'> |
52 | | - <ng-template igxFor let-item [igxForOf]="data" #virtDirVariableVertical [igxForTrackBy]='trackByKey' |
53 | | - [igxForScrollOrientation]="'vertical'" |
54 | | - [igxForContainerSize]='"500px"' |
55 | | - [igxForItemSize]='"100px"' |
56 | | - let-rowIndex="index"> |
57 | | - <div [style.height.px]='item.height'>{{rowIndex}} : {{item.text}}</div> |
58 | | - </ng-template> |
59 | | - </div> |
60 | | -</article> |
| 50 | + <ng-template igxFor let-item [igxForOf]="data" #virtDirVariableVertical [igxForTrackBy]='trackByKey' |
| 51 | + [igxForScrollOrientation]="'vertical'" |
| 52 | + [igxForContainerSize]='"500px"' |
| 53 | + [igxForItemSize]='"100px"' |
| 54 | + let-rowIndex="index"> |
| 55 | + <div [style.height.px]='item.height'>{{rowIndex}} : {{item.text}}</div> |
| 56 | + </ng-template> |
| 57 | + </div> |
| 58 | + </article> |
| 59 | + <article class="sample-column"> |
| 60 | + <span><i>Even</i> variable</span> |
| 61 | + <br/> |
| 62 | + <div style='height:500px; position: relative; overflow: hidden'> |
| 63 | + <ng-template igxFor let-item [igxForOf]="data" #virtDirVertical |
| 64 | + [igxForScrollOrientation]="'vertical'" |
| 65 | + [igxForContainerSize]='"500px"' |
| 66 | + [igxForItemSize]='itemSize' |
| 67 | + let-rowIndex="index" |
| 68 | + let-odd="odd" |
| 69 | + let-even="even"> |
| 70 | + <div [ngClass]="{even: even}" [style.height]='itemSize'>{{rowIndex}} : {{item.text}}</div> |
| 71 | + </ng-template> |
| 72 | + </div> |
| 73 | + </article> |
61 | 74 | <article class="sample-column"> |
62 | | - <span>Remote Virtualization</span> |
63 | | - <br/> |
64 | | - <div style='height:500px; position: relative; overflow: hidden'> |
65 | | - <ng-template igxFor let-item [igxForOf]="remoteData | async" (onChunkPreload)="chunkLoading($event)" |
66 | | - [igxForScrollOrientation]="'vertical'" |
67 | | - [igxForContainerSize]='"500px"' |
68 | | - [igxForItemSize]='"50px"' |
69 | | - let-rowIndex="index" #virtDirRemote> |
70 | | - <div style='height:50px;'>Index: {{rowIndex}}, ID: {{item.ProductID}}, Name : {{item.ProductName}}</div> |
71 | | - </ng-template> |
72 | | - </div> |
| 75 | + <span>Remote Virtualization</span> |
| 76 | + <br/> |
| 77 | + <div style='height:500px; position: relative; overflow: hidden'> |
| 78 | + <ng-template igxFor let-item [igxForOf]="remoteData | async" (onChunkPreload)="chunkLoading($event)" |
| 79 | + [igxForScrollOrientation]="'vertical'" |
| 80 | + [igxForContainerSize]='"500px"' |
| 81 | + [igxForItemSize]='"50px"' |
| 82 | + let-rowIndex="index" #virtDirRemote> |
| 83 | + <div style='height:50px;'>Index: {{rowIndex}}, ID: {{item.ProductID}}, Name : {{item.ProductName}}</div> |
| 84 | + </ng-template> |
| 85 | + </div> |
73 | 86 | </article> |
74 | 87 | </div> |
0 commit comments