diff options
author | Chocobozzz <me@florianbigard.com> | 2021-12-24 15:37:42 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-12-24 15:42:55 +0100 |
commit | e6492b2de61e5eef5ea9bc1bf19463c065f3f41d (patch) | |
tree | 120d1f4c56e0562cc610a58dee55a5b9d3f3dc21 /client/src/app/core/rest | |
parent | 656ed49f24f678d54ebbf420809c1bd5162587c8 (diff) | |
download | PeerTube-e6492b2de61e5eef5ea9bc1bf19463c065f3f41d.tar.gz PeerTube-e6492b2de61e5eef5ea9bc1bf19463c065f3f41d.tar.zst PeerTube-e6492b2de61e5eef5ea9bc1bf19463c065f3f41d.zip |
Remove unnecessary onPage event on admin tables
Diffstat (limited to 'client/src/app/core/rest')
-rw-r--r-- | client/src/app/core/rest/rest-table.ts | 20 |
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() |