diff options
author | Chocobozzz <me@florianbigard.com> | 2020-12-08 11:54:07 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2020-12-08 11:56:31 +0100 |
commit | 6c53d8bf1d0662c1ef86463981f2afd2d9568b50 (patch) | |
tree | 07b14931ebf1388594eb4c65076dd684a701cfa2 /client/src/app | |
parent | 8e2392e512f2652267b5483a17ce12f6deb645b8 (diff) | |
download | PeerTube-6c53d8bf1d0662c1ef86463981f2afd2d9568b50.tar.gz PeerTube-6c53d8bf1d0662c1ef86463981f2afd2d9568b50.tar.zst PeerTube-6c53d8bf1d0662c1ef86463981f2afd2d9568b50.zip |
Fix loading data twice in rest tables
Diffstat (limited to 'client/src/app')
-rw-r--r-- | client/src/app/core/rest/rest-table.ts | 2 | ||||
-rw-r--r-- | client/src/app/shared/shared-abuse-list/abuse-list-table.component.html | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/client/src/app/core/rest/rest-table.ts b/client/src/app/core/rest/rest-table.ts index 50f6bf39d..d53cac4c8 100644 --- a/client/src/app/core/rest/rest-table.ts +++ b/client/src/app/core/rest/rest-table.ts | |||
@@ -110,8 +110,8 @@ export abstract class RestTable { | |||
110 | .subscribe(params => { | 110 | .subscribe(params => { |
111 | this.search = params.search || '' | 111 | this.search = params.search || '' |
112 | 112 | ||
113 | // Primeng table will run an event to load data | ||
113 | this.setTableFilter(this.search) | 114 | this.setTableFilter(this.search) |
114 | this.loadData() | ||
115 | }) | 115 | }) |
116 | } | 116 | } |
117 | 117 | ||
diff --git a/client/src/app/shared/shared-abuse-list/abuse-list-table.component.html b/client/src/app/shared/shared-abuse-list/abuse-list-table.component.html index 1c4149147..8428032bf 100644 --- a/client/src/app/shared/shared-abuse-list/abuse-list-table.component.html +++ b/client/src/app/shared/shared-abuse-list/abuse-list-table.component.html | |||
@@ -1,6 +1,6 @@ | |||
1 | <p-table | 1 | <p-table |
2 | [value]="abuses" [lazy]="true" [paginator]="totalRecords > 0" [totalRecords]="totalRecords" [rows]="rowsPerPage" [rowsPerPageOptions]="rowsPerPageOptions" | 2 | [value]="abuses" [lazy]="true" [paginator]="totalRecords > 0" [totalRecords]="totalRecords" [rows]="rowsPerPage" [rowsPerPageOptions]="rowsPerPageOptions" |
3 | [sortField]="sort.field" [sortOrder]="sort.order" (onLazyLoad)="loadLazy($event)" dataKey="id" [resizableColumns]="true" [lazyLoadOnInit]="false" | 3 | [sortField]="sort.field" [sortOrder]="sort.order" (onLazyLoad)="loadLazy($event)" dataKey="id" [resizableColumns]="true" |
4 | [showCurrentPageReport]="true" i18n-currentPageReportTemplate | 4 | [showCurrentPageReport]="true" i18n-currentPageReportTemplate |
5 | currentPageReportTemplate="Showing {{'{first}'}} to {{'{last}'}} of {{'{totalRecords}'}} reports" | 5 | currentPageReportTemplate="Showing {{'{first}'}} to {{'{last}'}} of {{'{totalRecords}'}} reports" |
6 | (onPage)="onPage($event)" [expandedRowKeys]="expandedRows" | 6 | (onPage)="onPage($event)" [expandedRowKeys]="expandedRows" |