Fix jobs sorting

pull/333/head
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()
}