Skip to content

Commit

Permalink
fix: make the search reset button work properly
Browse files Browse the repository at this point in the history
  • Loading branch information
jnsgruk committed Dec 15, 2023
1 parent 128200e commit 45300e0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions webui/static/js/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,13 @@ const initNavigationSearch = () => {
})
})

const resetButton = document.querySelector(".p-search-box__reset")
resetButton.addEventListener("click", () => {
document.querySelectorAll(".drink").forEach(r => {
r.style.display = ""
})
})

document.querySelector(".p-search-box").addEventListener("submit", e => e.preventDefault())

document.querySelector(".p-navigation__search-overlay").addEventListener("click", closeSearch)
Expand Down

0 comments on commit 45300e0

Please sign in to comment.