Skip to content

Commit

Permalink
Add search input reset on category change
Browse files Browse the repository at this point in the history
  • Loading branch information
selfsigned committed Jan 23, 2024
1 parent 86d443c commit 82693a4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/routes/app/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
$currentCategory = defaultCategory;
function selectCategory(e, category) {
$currentItem = null; // Reset the selected item on category change
searchInput = ''; // Reset the search input as well
$currentCategory = category === $currentCategory ? defaultCategory : category;
}
Expand Down

0 comments on commit 82693a4

Please sign in to comment.