diff options
Diffstat (limited to 'client/src/app/core/rest/rest-table.ts')
-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 () { |