Skip to content

Commit 56ea20e

Browse files
committed
fix(reset input): clear input field after submission
1 parent b857900 commit 56ea20e

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

web/src/hooks/useFormHandler.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ const useFormHandler = <T extends FieldValues, K>(
1414

1515
const onSubmit = (data: K, content: string) => {
1616
addMessage(UserType.USER, content, uuid());
17+
formMethods.reset();
1718
if (data) setRequest({ ...data, requestId: uuid() });
1819
};
1920
return { formMethods, request, handleSubmit, onSubmit };

0 commit comments

Comments
 (0)