fix react hook form

This commit is contained in:
João Geonizeli
2022-07-22 12:28:00 -03:00
parent feb72ce6a4
commit 20781746e6
17 changed files with 71 additions and 97 deletions

View File

@@ -97,9 +97,7 @@ export const Form: FC<Props> = ({question, onSubmit, onDraftSubmit, alert}) => {
const handleDraftSave = () => {
if (onDraftSubmit) {
onDraftSubmit({...getFormattedInputValues(), status: QuestionStatus.Draft} as QuestionCreateInput)
reset(getValues(), {
isDirty: false
})
reset(getValues())
dispatch(turnOff())
}
}
@@ -117,9 +115,7 @@ export const Form: FC<Props> = ({question, onSubmit, onDraftSubmit, alert}) => {
setValidationErrors(errors)
}
reset(getValues(), {
isDirty: false
})
reset(getValues())
}
return (