Fix loading data twice in rest tables
This commit is contained in:
parent
8e2392e512
commit
6c53d8bf1d
2 changed files with 2 additions and 2 deletions
|
@ -110,8 +110,8 @@ export abstract class RestTable {
|
||||||
.subscribe(params => {
|
.subscribe(params => {
|
||||||
this.search = params.search || ''
|
this.search = params.search || ''
|
||||||
|
|
||||||
|
// Primeng table will run an event to load data
|
||||||
this.setTableFilter(this.search)
|
this.setTableFilter(this.search)
|
||||||
this.loadData()
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<p-table
|
<p-table
|
||||||
[value]="abuses" [lazy]="true" [paginator]="totalRecords > 0" [totalRecords]="totalRecords" [rows]="rowsPerPage" [rowsPerPageOptions]="rowsPerPageOptions"
|
[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
|
[showCurrentPageReport]="true" i18n-currentPageReportTemplate
|
||||||
currentPageReportTemplate="Showing {{'{first}'}} to {{'{last}'}} of {{'{totalRecords}'}} reports"
|
currentPageReportTemplate="Showing {{'{first}'}} to {{'{last}'}} of {{'{totalRecords}'}} reports"
|
||||||
(onPage)="onPage($event)" [expandedRowKeys]="expandedRows"
|
(onPage)="onPage($event)" [expandedRowKeys]="expandedRows"
|
||||||
|
|
Loading…
Reference in a new issue