1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 19:42:24 +02:00

Fix admin table filters

This commit is contained in:
Chocobozzz 2020-12-17 15:48:54 +01:00
parent ac2b052d54
commit 3f6441e09a
No known key found for this signature in database
GPG key ID: 583A612D890159BE
5 changed files with 10 additions and 6 deletions

View file

@ -131,10 +131,14 @@ export abstract class RestTable {
this.expandedRows = {}
}
setTableFilter (filter: string) {
setTableFilter (filter: string, triggerEvent = true) {
// FIXME: cannot use ViewChild, so create a component for the filter input
const filterInput = document.getElementById('table-filter') as HTMLInputElement
if (filterInput) filterInput.value = filter
if (!filterInput) return
filterInput.value = filter
if (triggerEvent) filterInput.dispatchEvent(new Event('keyup'))
}
resetSearch () {