Skip to content

Commit

Permalink
Clear filtered secrets list when deleting filter
Browse files Browse the repository at this point in the history
  • Loading branch information
jarmo committed Mar 3, 2020
1 parent 7c59290 commit 59fd18d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion assets/js/auto_suggest.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ function AutoSuggest() {
var search = defer(function(event) {
var target = event.target
if (target.id === "filter") {
target.closest("form").querySelector("input[type='submit']").click()
var form = target.closest("form")
if (!target.value) document.querySelector(form.dataset.container).innerHTML = ""
form.querySelector("input[type='submit']").click()
}
})

Expand Down

0 comments on commit 59fd18d

Please sign in to comment.