aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/core/rest/rest-table.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/core/rest/rest-table.ts')
-rw-r--r--client/src/app/core/rest/rest-table.ts20
1 files changed, 4 insertions, 16 deletions
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 {
47 field: event.sortField 47 field: event.sortField
48 } 48 }
49 49
50 this.rowsPerPage = event.rows
51
50 this.pagination = { 52 this.pagination = {
51 start: event.first, 53 start: event.first,
52 count: this.rowsPerPage 54 count: this.rowsPerPage
53 } 55 }
54 56
57 this.expandedRows = {}
58
55 this.reloadData() 59 this.reloadData()
56 this.saveSort() 60 this.saveSort()
57 } 61 }
@@ -60,22 +64,6 @@ export abstract class RestTable {
60 peertubeLocalStorage.setItem(this.getSortLocalStorageKey(), JSON.stringify(this.sort)) 64 peertubeLocalStorage.setItem(this.getSortLocalStorageKey(), JSON.stringify(this.sort))
61 } 65 }
62 66
63 onPage (event: { first: number, rows: number }) {
64 logger('On page %o.', event)
65
66 if (this.rowsPerPage !== event.rows) {
67 this.rowsPerPage = event.rows
68 this.pagination = {
69 start: event.first,
70 count: this.rowsPerPage
71 }
72
73 this.reloadData()
74 }
75
76 this.expandedRows = {}
77 }
78
79 onSearch (search: string) { 67 onSearch (search: string) {
80 this.search = search 68 this.search = search
81 this.reloadData() 69 this.reloadData()