Skip to content

Commit

Permalink
fix: fixed enter key issue (#9396)
Browse files Browse the repository at this point in the history
  • Loading branch information
noufalrahim authored Dec 12, 2024
1 parent 8a3a59f commit ae8ac6f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/components/Form/Form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,11 @@ const Form = <T extends FormDetails>({
return (
<form
onSubmit={handleSubmit}
onKeyDown={(e) => {
if (e.key === "Enter") {
handleSubmit(e);
}
}}
className={classNames(
"mx-auto w-full",
!props.noPadding && "px-8 py-5 md:px-16 md:py-11",
Expand Down

0 comments on commit ae8ac6f

Please sign in to comment.