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

View File

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