Fix jobs sorting
This commit is contained in:
parent
b3eeb529d9
commit
5e4b6992ab
2 changed files with 1 additions and 5 deletions
|
@ -10,7 +10,7 @@
|
|||
|
||||
<p-table
|
||||
[value]="jobs" [lazy]="true" [paginator]="true" [totalRecords]="totalRecords" [rows]="rowsPerPage" dataKey="id"
|
||||
sortField="createdAt" (onLazyLoad)="loadLazy($event)"
|
||||
[sortField]="sort.field" [sortOrder]="sort.order" (onLazyLoad)="loadLazy($event)"
|
||||
>
|
||||
<ng-template pTemplate="header">
|
||||
<tr>
|
||||
|
|
|
@ -23,7 +23,6 @@ export class JobsListComponent extends RestTable implements OnInit {
|
|||
rowsPerPage = 10
|
||||
sort: SortMeta = { field: 'createdAt', order: -1 }
|
||||
pagination: RestPagination = { count: this.rowsPerPage, start: 0 }
|
||||
scrollHeight = ''
|
||||
|
||||
constructor (
|
||||
private notificationsService: NotificationsService,
|
||||
|
@ -34,9 +33,6 @@ export class JobsListComponent extends RestTable implements OnInit {
|
|||
}
|
||||
|
||||
ngOnInit () {
|
||||
// 380 -> headers + footer...
|
||||
this.scrollHeight = (viewportHeight() - 380) + 'px'
|
||||
|
||||
this.loadJobState()
|
||||
this.loadSort()
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue