Skip to content

Commit

Permalink
add reset onChange
Browse files Browse the repository at this point in the history
  • Loading branch information
Tanarak Chunsanit authored and Tanarak Chunsanit committed Nov 5, 2024
1 parent c59fec0 commit b049e20
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ searchBox.addEventListener("input",async e=>{
const searchQuery = e.target.value
searchList.style.display = "none"
searchList.innerText = ""
result.innerHTML=""
if(searchQuery){
const list = await searchHandler(e.target.value)
if(list.length>0){
Expand Down

0 comments on commit b049e20

Please sign in to comment.