<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>
rowsPerPage = 10
sort: SortMeta = { field: 'createdAt', order: -1 }
pagination: RestPagination = { count: this.rowsPerPage, start: 0 }
- scrollHeight = ''
constructor (
private notificationsService: NotificationsService,
}
ngOnInit () {
- // 380 -> headers + footer...
- this.scrollHeight = (viewportHeight() - 380) + 'px'
-
this.loadJobState()
this.loadSort()
}