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