,
+ ) => {
if (evt.code === "Enter" && form.formState.isValid) {
form.handleSubmit(async () => {
await onSubmit(new FormData(formRef.current!));
@@ -223,7 +230,9 @@ const UserDetails: FC = () => {
handleEnterKey(e, accountForm, onSubmitAccount)}
+ onKeyDown={(e) =>
+ handleEnterKey(e, accountForm, onSubmitAccount)
+ }
{...field}
/>
@@ -253,7 +262,11 @@ const UserDetails: FC = () => {
)}
/>
-
@@ -348,7 +365,9 @@ const UserDetails: FC = () => {
handleEnterKey(e, passwordForm, onSubmitPassword)}
+ onKeyDown={(e) =>
+ handleEnterKey(e, passwordForm, onSubmitPassword)
+ }
{...field}
/>
@@ -368,7 +387,9 @@ const UserDetails: FC = () => {
handleEnterKey(e, passwordForm, onSubmitPassword)}
+ onKeyDown={(e) =>
+ handleEnterKey(e, passwordForm, onSubmitPassword)
+ }
{...field}
/>
@@ -378,7 +399,10 @@ const UserDetails: FC = () => {
)}
/>
-
+
Update password