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