1
0
Fork 0

Fix jobs sorting

This commit is contained in:
Chocobozzz 2018-03-08 14:08:29 +01:00
parent b3eeb529d9
commit 5e4b6992ab
No known key found for this signature in database
GPG key ID: 583A612D890159BE
2 changed files with 1 additions and 5 deletions

View file

@ -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>

View file

@ -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()
}