Fix history datatable pagination.
This commit is contained in:
parent
4d32176387
commit
bb429ceadb
@ -333,7 +333,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div *ngIf="account" class="card mt-1">
|
||||
<div class="card mt-1">
|
||||
<app-account-history
|
||||
*ngIf="history"
|
||||
[account]="history?.snapshot.data"
|
||||
@ -414,7 +414,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<mat-tab-group *ngIf="account" dynamicHeight mat-align-tabs="start">
|
||||
<mat-tab-group dynamicHeight mat-align-tabs="start">
|
||||
<mat-tab label="Transactions">
|
||||
<app-transaction-details
|
||||
[transaction]="transaction"
|
||||
|
@ -58,7 +58,7 @@ export class AccountDetailsComponent implements OnInit, AfterViewInit {
|
||||
];
|
||||
historyDefaultPageSize: number = 10;
|
||||
historyPageSizeOptions: Array<number> = [10, 20, 50, 100];
|
||||
@ViewChild('HistoryTablePaginator', { static: true }) historyPaginator: MatPaginator;
|
||||
@ViewChild('HistoryTablePaginator', { static: true }) historyTablePaginator: MatPaginator;
|
||||
@ViewChild('HistoryTableSort', { static: true }) historyTableSort: MatSort;
|
||||
|
||||
accountInfoForm: FormGroup;
|
||||
@ -193,7 +193,7 @@ export class AccountDetailsComponent implements OnInit, AfterViewInit {
|
||||
|
||||
this.userService.historySubject.subscribe(async (histories) => {
|
||||
this.historyDataSource = new MatTableDataSource<any>(histories);
|
||||
this.historyDataSource.paginator = this.historyPaginator;
|
||||
this.historyDataSource.paginator = this.historyTablePaginator;
|
||||
this.historyDataSource.sort = this.historyTableSort;
|
||||
this.histories = histories;
|
||||
if (histories.length > 0) {
|
||||
@ -243,7 +243,7 @@ export class AccountDetailsComponent implements OnInit, AfterViewInit {
|
||||
this.transactionsDataSource.sort = this.transactionTableSort;
|
||||
}
|
||||
if (this.historyDataSource) {
|
||||
this.historyDataSource.paginator = this.historyPaginator;
|
||||
this.historyDataSource.paginator = this.historyTablePaginator;
|
||||
this.historyDataSource.sort = this.historyTableSort;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user