diff options
author | Rigel Kent <sendmemail@rigelk.eu> | 2020-05-03 16:20:19 +0200 |
---|---|---|
committer | Rigel Kent <par@rigelk.eu> | 2020-05-04 15:01:44 +0200 |
commit | d405118360b7356d86cd570ceb665d38cc1c17f7 (patch) | |
tree | ae1acc2d984d884b528d6c15c075ad308132be1b /client/src/app/shared | |
parent | 9b1fa49b6032c149d8a848da086f60e52bd4b82a (diff) | |
download | PeerTube-d405118360b7356d86cd570ceb665d38cc1c17f7.tar.gz PeerTube-d405118360b7356d86cd570ceb665d38cc1c17f7.tar.zst PeerTube-d405118360b7356d86cd570ceb665d38cc1c17f7.zip |
Bind expanded rows to item ids instead of row number
Diffstat (limited to 'client/src/app/shared')
-rw-r--r-- | client/src/app/shared/rest/rest-table.ts | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/client/src/app/shared/rest/rest-table.ts b/client/src/app/shared/rest/rest-table.ts index 891fb7b2b..4dd0f5ff3 100644 --- a/client/src/app/shared/rest/rest-table.ts +++ b/client/src/app/shared/rest/rest-table.ts | |||
@@ -13,6 +13,7 @@ export abstract class RestTable { | |||
13 | search: string | 13 | search: string |
14 | rowsPerPageOptions = [ 10, 20, 50, 100 ] | 14 | rowsPerPageOptions = [ 10, 20, 50, 100 ] |
15 | rowsPerPage = this.rowsPerPageOptions[0] | 15 | rowsPerPage = this.rowsPerPageOptions[0] |
16 | expandedRows = {} | ||
16 | 17 | ||
17 | private searchStream: Subject<string> | 18 | private searchStream: Subject<string> |
18 | 19 | ||
@@ -73,6 +74,10 @@ export abstract class RestTable { | |||
73 | this.searchStream.next(target.value) | 74 | this.searchStream.next(target.value) |
74 | } | 75 | } |
75 | 76 | ||
77 | onPage () { | ||
78 | this.expandedRows = {} | ||
79 | } | ||
80 | |||
76 | protected abstract loadData (): void | 81 | protected abstract loadData (): void |
77 | 82 | ||
78 | private getSortLocalStorageKey () { | 83 | private getSortLocalStorageKey () { |