fix: password not updatable after an api error (#8514)
* fix: error clearance * changes --------- Co-authored-by: Peer Richelsen <peeroke@gmail.com> Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com>
This commit is contained in:
parent
8a6c420268
commit
668ea088ef
|
@ -199,6 +199,7 @@ const PasswordView = () => {
|
|||
color="primary"
|
||||
className="mt-8"
|
||||
type="submit"
|
||||
onClick={() => formMethods.clearErrors("apiError")}
|
||||
disabled={isDisabled || passwordMutation.isLoading || sessionMutation.isLoading}>
|
||||
{t("update")}
|
||||
</Button>
|
||||
|
|
|
@ -347,10 +347,6 @@ const PlainForm = <T extends FieldValues>(props: FormProps<T>, ref: Ref<HTMLForm
|
|||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
|
||||
if (form.formState?.errors?.apiError) {
|
||||
form.clearErrors("root");
|
||||
}
|
||||
|
||||
form
|
||||
.handleSubmit(handleSubmit)(event)
|
||||
.catch((err) => {
|
||||
|
|
Loading…
Reference in New Issue
Block a user