From 77861b52e3d99af4ae91b8d915fab6d2680a54db Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Mon, 28 Dec 2020 13:54:56 +0100 Subject: [PATCH] web: fix search loading old results when using enter --- web/src/elements/table/Table.ts | 2 +- web/src/elements/table/TableSearch.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/web/src/elements/table/Table.ts b/web/src/elements/table/Table.ts index 0cf75ed82..379073692 100644 --- a/web/src/elements/table/Table.ts +++ b/web/src/elements/table/Table.ts @@ -144,7 +144,7 @@ export abstract class Table extends LitElement {
- ${inner ? inner : html``} + ${inner ? inner : html``}
diff --git a/web/src/elements/table/TableSearch.ts b/web/src/elements/table/TableSearch.ts index 1cc676c7b..4d6d1ab13 100644 --- a/web/src/elements/table/TableSearch.ts +++ b/web/src/elements/table/TableSearch.ts @@ -26,9 +26,9 @@ export class TableSearch extends LitElement { if (el.value === "") return; this.onSearch(el?.value); }}> - { + { if (!this.onSearch) return; - this.onSearch(""); + this.onSearch((ev.target as HTMLInputElement).value); }}>