diff --git a/client/src/app/+admin/follows/followers-list/followers-list.component.html b/client/src/app/+admin/follows/followers-list/followers-list.component.html index 08459634d..1df7bb164 100644 --- a/client/src/app/+admin/follows/followers-list/followers-list.component.html +++ b/client/src/app/+admin/follows/followers-list/followers-list.component.html @@ -5,7 +5,7 @@ diff --git a/client/src/app/+admin/moderation/instance-blocklist/instance-account-blocklist.component.html b/client/src/app/+admin/moderation/instance-blocklist/instance-account-blocklist.component.html index e3a3a8320..feade0c26 100644 --- a/client/src/app/+admin/moderation/instance-blocklist/instance-account-blocklist.component.html +++ b/client/src/app/+admin/moderation/instance-blocklist/instance-account-blocklist.component.html @@ -1,6 +1,6 @@
diff --git a/client/src/app/+admin/moderation/video-comment-list/video-comment-list.component.html b/client/src/app/+admin/moderation/video-comment-list/video-comment-list.component.html index f9ab36f4a..9bf23c21a 100644 --- a/client/src/app/+admin/moderation/video-comment-list/video-comment-list.component.html +++ b/client/src/app/+admin/moderation/video-comment-list/video-comment-list.component.html @@ -13,8 +13,7 @@ [lazy]="true" (onLazyLoad)="loadLazy($event)" [lazyLoadOnInit]="false" [selectionPageOnly]="true" [showCurrentPageReport]="true" i18n-currentPageReportTemplate currentPageReportTemplate="Showing {{'{first}'}} to {{'{last}'}} of {{'{totalRecords}'}} comments" - (onPage)="onPage($event)" [expandedRowKeys]="expandedRows" - [(selection)]="selectedComments" + [expandedRowKeys]="expandedRows" [(selection)]="selectedComments" >
diff --git a/client/src/app/+admin/overview/users/user-list/user-list.component.html b/client/src/app/+admin/overview/users/user-list/user-list.component.html index d0cf21b73..7eb89fea1 100644 --- a/client/src/app/+admin/overview/users/user-list/user-list.component.html +++ b/client/src/app/+admin/overview/users/user-list/user-list.component.html @@ -9,7 +9,7 @@ [lazy]="true" (onLazyLoad)="loadLazy($event)" [lazyLoadOnInit]="false" [selectionPageOnly]="true" [showCurrentPageReport]="true" i18n-currentPageReportTemplate currentPageReportTemplate="Showing {{'{first}'}} to {{'{last}'}} of {{'{totalRecords}'}} users" - (onPage)="onPage($event)" [expandedRowKeys]="expandedRows" + [expandedRowKeys]="expandedRows" >
diff --git a/client/src/app/+admin/overview/videos/video-list.component.html b/client/src/app/+admin/overview/videos/video-list.component.html index d1b1a527e..121bc502c 100644 --- a/client/src/app/+admin/overview/videos/video-list.component.html +++ b/client/src/app/+admin/overview/videos/video-list.component.html @@ -5,12 +5,11 @@
diff --git a/client/src/app/+admin/system/jobs/jobs.component.html b/client/src/app/+admin/system/jobs/jobs.component.html index b68179a41..638d2380a 100644 --- a/client/src/app/+admin/system/jobs/jobs.component.html +++ b/client/src/app/+admin/system/jobs/jobs.component.html @@ -34,10 +34,10 @@ diff --git a/client/src/app/+my-library/my-video-imports/my-video-imports.component.html b/client/src/app/+my-library/my-video-imports/my-video-imports.component.html index 3897eb162..bd29b11c8 100644 --- a/client/src/app/+my-library/my-video-imports/my-video-imports.component.html +++ b/client/src/app/+my-library/my-video-imports/my-video-imports.component.html @@ -8,7 +8,7 @@ [sortField]="sort.field" [sortOrder]="sort.order" (onLazyLoad)="loadLazy($event)" dataKey="id" [showCurrentPageReport]="true" i18n-currentPageReportTemplate currentPageReportTemplate="Showing {{'{first}'}} to {{'{last}'}} of {{'{totalRecords}'}} imports" - (onPage)="onPage($event)" [expandedRowKeys]="expandedRows" + [expandedRowKeys]="expandedRows" > diff --git a/client/src/app/core/rest/rest-table.ts b/client/src/app/core/rest/rest-table.ts index a5b48f10c..d8b039187 100644 --- a/client/src/app/core/rest/rest-table.ts +++ b/client/src/app/core/rest/rest-table.ts @@ -47,11 +47,15 @@ export abstract class RestTable { field: event.sortField } + this.rowsPerPage = event.rows + this.pagination = { start: event.first, count: this.rowsPerPage } + this.expandedRows = {} + this.reloadData() this.saveSort() } @@ -60,22 +64,6 @@ export abstract class RestTable { peertubeLocalStorage.setItem(this.getSortLocalStorageKey(), JSON.stringify(this.sort)) } - onPage (event: { first: number, rows: number }) { - logger('On page %o.', event) - - if (this.rowsPerPage !== event.rows) { - this.rowsPerPage = event.rows - this.pagination = { - start: event.first, - count: this.rowsPerPage - } - - this.reloadData() - } - - this.expandedRows = {} - } - onSearch (search: string) { this.search = search this.reloadData() 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 0d75a21d7..07cc73461 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 @@ -4,7 +4,7 @@ [lazy]="true" (onLazyLoad)="loadLazy($event)" [lazyLoadOnInit]="false" [showCurrentPageReport]="true" i18n-currentPageReportTemplate currentPageReportTemplate="Showing {{'{first}'}} to {{'{last}'}} of {{'{totalRecords}'}} reports" - (onPage)="onPage($event)" [expandedRowKeys]="expandedRows" + [expandedRowKeys]="expandedRows" >
diff --git a/client/src/app/shared/shared-moderation/account-blocklist.component.html b/client/src/app/shared/shared-moderation/account-blocklist.component.html index a9fac0810..637abcb51 100644 --- a/client/src/app/shared/shared-moderation/account-blocklist.component.html +++ b/client/src/app/shared/shared-moderation/account-blocklist.component.html @@ -5,7 +5,7 @@ diff --git a/client/src/app/shared/shared-moderation/server-blocklist.component.html b/client/src/app/shared/shared-moderation/server-blocklist.component.html index c6d29bb21..1a320e9a4 100644 --- a/client/src/app/shared/shared-moderation/server-blocklist.component.html +++ b/client/src/app/shared/shared-moderation/server-blocklist.component.html @@ -5,7 +5,7 @@