diff options
author | Chocobozzz <me@florianbigard.com> | 2020-12-17 15:48:54 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2020-12-17 15:48:54 +0100 |
commit | 3f6441e09af842b4a49639cc7562865eace024bc (patch) | |
tree | d999de949e91c79f262387fe4d87bdb3e3416b47 /client/src/app/core | |
parent | ac2b052d5448a6c3a590f5f567a5297d8c41966c (diff) | |
download | PeerTube-3f6441e09af842b4a49639cc7562865eace024bc.tar.gz PeerTube-3f6441e09af842b4a49639cc7562865eace024bc.tar.zst PeerTube-3f6441e09af842b4a49639cc7562865eace024bc.zip |
Fix admin table filters
Diffstat (limited to 'client/src/app/core')
-rw-r--r-- | client/src/app/core/rest/rest-table.ts | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/client/src/app/core/rest/rest-table.ts b/client/src/app/core/rest/rest-table.ts index d53cac4c8..32c1db446 100644 --- a/client/src/app/core/rest/rest-table.ts +++ b/client/src/app/core/rest/rest-table.ts | |||
@@ -131,10 +131,14 @@ export abstract class RestTable { | |||
131 | this.expandedRows = {} | 131 | this.expandedRows = {} |
132 | } | 132 | } |
133 | 133 | ||
134 | setTableFilter (filter: string) { | 134 | setTableFilter (filter: string, triggerEvent = true) { |
135 | // FIXME: cannot use ViewChild, so create a component for the filter input | 135 | // FIXME: cannot use ViewChild, so create a component for the filter input |
136 | const filterInput = document.getElementById('table-filter') as HTMLInputElement | 136 | const filterInput = document.getElementById('table-filter') as HTMLInputElement |
137 | if (filterInput) filterInput.value = filter | 137 | if (!filterInput) return |
138 | |||
139 | filterInput.value = filter | ||
140 | |||
141 | if (triggerEvent) filterInput.dispatchEvent(new Event('keyup')) | ||
138 | } | 142 | } |
139 | 143 | ||
140 | resetSearch () { | 144 | resetSearch () { |