Skip to content

Commit

Permalink
Add search for user #11
Browse files Browse the repository at this point in the history
  • Loading branch information
Scobiform committed Apr 19, 2024
1 parent 8f26e89 commit d6a3876
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -105,16 +105,20 @@
window.graph = initGraph(graphData);
}

function handleKeyUp(event) {
async function handleKeyUp(event) {
clearTimeout(timeout);

// Check if the enter key is pressed
if (event.key === "Enter") {
submitForm();
}
else {
timeout = setTimeout(submitForm, delay);
}

}

function submitForm() {
async function submitForm() {
const form = document.getElementById('searchForUser');
form.submit();
}
Expand Down

0 comments on commit d6a3876

Please sign in to comment.