mirror of
https://github.com/mempool/mempool.git
synced 2025-01-16 02:06:36 +01:00
Optimization for bisq transaction table rendering
This commit is contained in:
parent
95bab64424
commit
dd0b67716f
@ -77,5 +77,7 @@ export class BisqIconComponent implements OnChanges {
|
||||
this.iconProp[1] = 'question';
|
||||
this.color = 'ffac00';
|
||||
}
|
||||
// @ts-ignore
|
||||
this.iconProp = this.iconProp.slice();
|
||||
}
|
||||
}
|
||||
|
@ -22,7 +22,7 @@
|
||||
<th class="d-none d-md-block">Height</th>
|
||||
</thead>
|
||||
<tbody *ngIf="transactions.value; else loadingTmpl">
|
||||
<tr *ngFor="let tx of transactions.value[0]">
|
||||
<tr *ngFor="let tx of transactions.value[0]; trackBy: trackByFn">
|
||||
<td><a [routerLink]="['/tx/' | relativeUrl, tx.id]" [state]="{ data: tx }">{{ tx.id | slice : 0 : 8 }}</a></td>
|
||||
<td class="d-none d-md-block">
|
||||
<app-bisq-icon class="mr-1" [txType]="tx.txType"></app-bisq-icon>
|
||||
|
@ -173,4 +173,8 @@ export class BisqTransactionsComponent implements OnInit {
|
||||
calculateTotalOutput(outputs: BisqOutput[]): number {
|
||||
return outputs.reduce((acc: number, output: BisqOutput) => acc + output.bsqAmount, 0);
|
||||
}
|
||||
|
||||
trackByFn(index: number) {
|
||||
return index;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user