Fix pagination on rest table
authorChocobozzz <me@florianbigard.com>
Tue, 24 Jul 2018 13:33:18 +0000 (15:33 +0200)
committerChocobozzz <me@florianbigard.com>
Tue, 24 Jul 2018 13:33:18 +0000 (15:33 +0200)
client/src/app/+admin/jobs/jobs-list/jobs-list.component.html
client/src/app/+admin/jobs/jobs-list/jobs-list.component.ts

index b52d026a72f6a0c6f55be0ad79af38f9794f27a0..7ed1888e2b2a2b0be0173f3706d38690bb0d6d29 100644 (file)
@@ -10,7 +10,7 @@
 
 <p-table
   [value]="jobs" [lazy]="true" [paginator]="true" [totalRecords]="totalRecords" [rows]="rowsPerPage" dataKey="uniqId"
-  [sortField]="sort.field" [sortOrder]="sort.order" (onLazyLoad)="loadLazy($event)"
+  [sortField]="sort.field" [sortOrder]="sort.order" (onLazyLoad)="loadLazy($event)" [first]="pagination.start"
 >
   <ng-template pTemplate="header">
     <tr>
index a77f4a4a140aace6f511e9794d9fc81cce4772c7..44ab59d3637061fa5f57953cabe2d51c2c2a40cb 100644 (file)
@@ -40,6 +40,8 @@ export class JobsListComponent extends RestTable implements OnInit {
   }
 
   onJobStateChanged () {
+    this.pagination.start = 0
+
     this.loadData()
     this.saveJobState()
   }