Fix loading data twice in rest tables
This commit is contained in:
parent
8e2392e512
commit
6c53d8bf1d
|
@ -110,8 +110,8 @@ export abstract class RestTable {
|
|||
.subscribe(params => {
|
||||
this.search = params.search || ''
|
||||
|
||||
// Primeng table will run an event to load data
|
||||
this.setTableFilter(this.search)
|
||||
this.loadData()
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<p-table
|
||||
[value]="abuses" [lazy]="true" [paginator]="totalRecords > 0" [totalRecords]="totalRecords" [rows]="rowsPerPage" [rowsPerPageOptions]="rowsPerPageOptions"
|
||||
[sortField]="sort.field" [sortOrder]="sort.order" (onLazyLoad)="loadLazy($event)" dataKey="id" [resizableColumns]="true" [lazyLoadOnInit]="false"
|
||||
[sortField]="sort.field" [sortOrder]="sort.order" (onLazyLoad)="loadLazy($event)" dataKey="id" [resizableColumns]="true"
|
||||
[showCurrentPageReport]="true" i18n-currentPageReportTemplate
|
||||
currentPageReportTemplate="Showing {{'{first}'}} to {{'{last}'}} of {{'{totalRecords}'}} reports"
|
||||
(onPage)="onPage($event)" [expandedRowKeys]="expandedRows"
|
||||
|
|
Loading…
Reference in New Issue