[Svelte]: Hide suggestion UI after query was submitted (#62574)

This commit is contained in:
Vova Kulikov 2024-05-10 17:05:51 +02:00 committed by GitHub
parent d24a14f34d
commit 7f9549efbf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -197,6 +197,11 @@
// this, SvelteKit will not re-run the loader because the URL hasn't changed.
await invalidate(`search:${url}`)
void goto(url)
// Reset interaction state since after success submit we should hide
// suggestions UI but still keep focus on input, after user interacts with
// search input again we show suggestion panel
userHasInteracted = false
}
async function handleSubmit(event: Event) {