From e84ce978817aaa0fee4e56215ff06766d6de7546 Mon Sep 17 00:00:00 2001 From: Allan Lasser Date: Wed, 24 Apr 2024 13:15:12 -0400 Subject: [PATCH] Submit new empty search on clear to reset results --- src/lib/components/inputs/Search.svelte | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lib/components/inputs/Search.svelte b/src/lib/components/inputs/Search.svelte index 886392cef..718beaf3a 100644 --- a/src/lib/components/inputs/Search.svelte +++ b/src/lib/components/inputs/Search.svelte @@ -3,15 +3,18 @@ export let name: string = null; export let query: string = ""; + let input: HTMLInputElement; + let form: HTMLFormElement; function clear() { query = ""; input.focus(); + form.submit(); } -
+