]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Fix jobs sorting
authorChocobozzz <me@florianbigard.com>
Thu, 8 Mar 2018 13:08:29 +0000 (14:08 +0100)
committerChocobozzz <me@florianbigard.com>
Thu, 8 Mar 2018 13:08:29 +0000 (14:08 +0100)
client/src/app/+admin/jobs/jobs-list/jobs-list.component.html
client/src/app/+admin/jobs/jobs-list/jobs-list.component.ts

index 1469cf611d6f8246f3b08ef9fcd4ee890f7e6284..2bc8ab3dd207b66748600f058c76fc7f43de65fc 100644 (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>
index 80aba9f3abb6e5aaed0fb0d5c4ffbfff92966a76..e3f317e6de940f3e231a7f8134d47613239b8df2 100644 (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()
   }