diff --git a/packages/keychain/src/components/Auth/Login.tsx b/packages/keychain/src/components/Auth/Login.tsx index caef20ce3..ccd9b4f40 100644 --- a/packages/keychain/src/components/Auth/Login.tsx +++ b/packages/keychain/src/components/Auth/Login.tsx @@ -109,7 +109,7 @@ export function Login({ placeholder="Username" validate={validateUsernameFor("login")} > - {({ field, meta }) => ( + {({ field, meta, form }) => ( form.setFieldValue(field.name, "")} /> )} diff --git a/packages/keychain/src/components/Auth/Signup.tsx b/packages/keychain/src/components/Auth/Signup.tsx index 9306a4dd1..1c73bf2ac 100644 --- a/packages/keychain/src/components/Auth/Signup.tsx +++ b/packages/keychain/src/components/Auth/Signup.tsx @@ -171,8 +171,6 @@ function Form({ }, ); - const onClearUsername = useClearField("username"); - const onLogin = useCallback(() => { onLoginProp(values.username); }, [values.username, onLoginProp]); @@ -194,14 +192,14 @@ function Form({ placeholder="Username" validate={validateUsernameFor("signup")} > - {({ field, meta }) => ( + {({ field, meta, form }) => ( form.setFieldValue(field.name, "")} isLoading={isValidating} /> )} diff --git a/packages/ui/src/components/Field.tsx b/packages/ui/src/components/Field.tsx index cbddc94a7..61d998cf1 100644 --- a/packages/ui/src/components/Field.tsx +++ b/packages/ui/src/components/Field.tsx @@ -67,7 +67,7 @@ export function Field({ cursor={isActive ? "pointer" : "default"} opacity={isActive ? 100 : 0} // workaround for onBlur handler triggeres before onClear > - + ) )}