Skip to content

Commit

Permalink
Update App.jsx
Browse files Browse the repository at this point in the history
updated onsubmit action
  • Loading branch information
slzakaria authored Oct 3, 2023
1 parent 18ca2fb commit 15d884b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@ function App() {
const handleSubmit = (event) => {
event.preventDefault();
console.log("Form submitted with ", searchInput.current.value);
//window.location.href = `/search?q=${searchInput.current.value}`;

resetSearch();
formWrapper.current.reset();
searchInput.current.focus();
resetSearch();
};

const handleSelection = (selection) => {
searchInput.current.value = selection;
console.log("Selection is ", selection);
//window.location.href = `/search?q=${searchInput.current.value}`;

resetSearch();
};

Expand Down

0 comments on commit 15d884b

Please sign in to comment.