Skip to content

Commit

Permalink
clear previous query before submitting the next one (#86)
Browse files Browse the repository at this point in the history
* clear previous query before submitting the next one
  • Loading branch information
WillNilges authored Sep 22, 2024
1 parent 165791b commit 8fb08f1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions components/QueryForm/QueryForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ export function QueryForm() {
}

async function sendForm(event: FormEvent<HTMLFormElement>) {
// Clear previous query results
setLegacyQueryResults([]);
setQueryResult([]);

event.preventDefault();
setIsLoading(true);
console.log(event);
Expand Down

0 comments on commit 8fb08f1

Please sign in to comment.