File tree 2 files changed +15
-2
lines changed
packages/insight-previous/src/components/transaction-list 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change 5
5
6
6
< div *ngIf ="!loading ">
7
7
< ion-grid >
8
- < ion-row *ngFor ="let tx of transactions ">
9
- < ion-col col-12 >
8
+ < ion-row *ngFor ="let tx of transactions; let i = index ">
9
+ < ion-col col-12 *ngIf =" i < limit " >
10
10
< transaction [tx] ="tx "> </ transaction >
11
11
</ ion-col >
12
12
</ ion-row >
13
+ < ion-row *ngIf ="limit < transactions.length ">
14
+ < ion-col col-12 text-center (click) ="loadMore() ">
15
+ < a > Load More</ a >
16
+ </ ion-col >
17
+ </ ion-row >
13
18
</ ion-grid >
14
19
</ div >
Original file line number Diff line number Diff line change @@ -15,6 +15,9 @@ export class TransactionListComponent implements OnInit {
15
15
@Input ( )
16
16
public transactions ?: any = [ ] ;
17
17
18
+ limit = 10 ;
19
+ chunkSize = 100 ;
20
+
18
21
constructor ( private txProvider : TxsProvider ) { }
19
22
20
23
ngOnInit ( ) : void {
@@ -33,4 +36,9 @@ export class TransactionListComponent implements OnInit {
33
36
this . loading = false ;
34
37
}
35
38
}
39
+
40
+ loadMore ( ) {
41
+ this . limit += this . chunkSize ;
42
+ this . chunkSize *= 2 ;
43
+ }
36
44
}
You can’t perform that action at this time.
0 commit comments