[ui] uridecode search query from url

feat/vaults
Tomáš Mládek 2022-02-04 22:26:31 +01:00
parent ff2fcd024b
commit f1f89617ad
No known key found for this signature in database
GPG Key ID: ED21612889E75EC5
1 changed files with 3 additions and 1 deletions

View File

@ -10,7 +10,9 @@
const searchMatch = useMatch("/search/:query");
let searchQuery = $searchMatch?.params.query || "";
let searchQuery = $searchMatch?.params.query
? decodeURIComponent($searchMatch?.params.query)
: "";
$: if (!$location.pathname.includes("search")) searchQuery = "";
function onInput(event: CustomEvent<string>) {
searchQuery = event.detail;