Is it possible to pass props down to all children?
For example passing a 'isSkeleton' prop down to each of my inputs to put them into a skeleton/loading state.
Return a promise in handleSubmit
I'm using the option "editable" of material-table, and I want to submit the form when the OK button is pressed, so I have something like this: The problem is that onRowUpdate needs to return a promise, if it's resolved the edit row closes, if it's rejected the edit row remains…
How to clear errors in onChange inside Controller?
Hi , I have a text field where user has to enter the value in combination of alphabets and number for that i added a input mask using react-input-mask . So that i wrapped the input field with Controller. OnSumbit the required errors will pop up. After as soon as the user starts…
How to know if the form was submitted successfully without any errors?
Trying to change button label if the form was submitted successfully (like 'Submit Another'). Is there any way to find this from formState? or do i have to do this from parent container?
watch is not memoized
Component re-render trigger redefinition of watch variable.
It may not be ideal in certain case when some useEffect depends on watch - Maybe I miss something.
How to show common field error validation ?
Eg: I am having four Form Fiels [ Name , Age , DOB ,Gender]. Instead of showing , this field is required ,error message , below that field. I need to show a common error message all fields are required.
How to persist form data with react-modal
I use RHF with react-modal.
If a user closes modal without submitting the form, I want to persist form data until a browser reloaded and then if the user opens modal again, they can see previous data user inputted.
How should I do that? …
How to read a 1200 lines useForm hook function?
I love this package so that I want to know the implementation details. But when I checkout out the source code, I see the big fat 1200 lines useForm. OMG, is it reasonable?
React-Hook-Form with redux
Hi, I'm trying to get React-Hook-Form working with Redux without success.
Got any example?
useFieldArray & remove & custom register
I have a field array question. In the docs, there is a note that says:
"It doesn't work with custom register at useEffect." …