]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/shared/rest/rest-table.ts
Bind expanded rows to item ids instead of row number
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / rest / rest-table.ts
index 891fb7b2b3cc179d00a1f7465ce1bb7bfbdd6d90..4dd0f5ff30d4eb71816baf2678ce4e5c97d7db4e 100644 (file)
@@ -13,6 +13,7 @@ export abstract class RestTable {
   search: string
   rowsPerPageOptions = [ 10, 20, 50, 100 ]
   rowsPerPage = this.rowsPerPageOptions[0]
+  expandedRows = {}
 
   private searchStream: Subject<string>
 
@@ -73,6 +74,10 @@ export abstract class RestTable {
     this.searchStream.next(target.value)
   }
 
+  onPage () {
+    this.expandedRows = {}
+  }
+
   protected abstract loadData (): void
 
   private getSortLocalStorageKey () {