How to set formState manully? #4052
Answered
by
bluebill1049
michael-land
asked this question in
General
-
My use case would be allow user restore data from previous input.
The problem is that the user is not able to submit the form immediately unless they change something. P.S. the submit button is disabled when form is not dirty or is not submitting Is there any way to set formState manually or could it be add in V7? // part of recover logic
<Button
onClick={() => {
form.reset(JSON.parse(localStorage.getItem(key) ?? '{}') as any);
toast('Data restored');
}}
>
Recover
</Button> |
Beta Was this translation helpful? Give feedback.
Answered by
bluebill1049
Jan 29, 2021
Replies: 1 comment 2 replies
-
sounds like you will have to do two reset?
|
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
michael-land
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
sounds like you will have to do two reset?