Skip to content

Commit

Permalink
reset search query when opening modal (#174)
Browse files Browse the repository at this point in the history
* reset search query when opening modal

* Add changeset

---------

Co-authored-by: Ivan Hofer <ivan.hofer@outlok.com>
Co-authored-by: Puru Vijay <devpuruvj@gmail.com>
Co-authored-by: Puru Vijay <47742487+PuruVJ@users.noreply.github.com>
  • Loading branch information
4 people committed Jul 22, 2023
1 parent 5498d82 commit c31f579
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/cold-rules-cover.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/site-kit': patch
---

(fix) reset search query when opening modal
3 changes: 3 additions & 0 deletions packages/site-kit/src/lib/search/SearchBox.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,10 @@ It appears when the user clicks on the `Search` component or presses the corresp
document.body.style.position = 'fixed';
$overlay_open = true;
resetSearchQuery()
}
const resetSearchQuery = () => $search_query = '';
</script>

<svelte:window
Expand Down

0 comments on commit c31f579

Please sign in to comment.