menu

React Hook Form

📋 Custom React hooks for form validation without the hassle

Channels
Team
Posts
Members
Info
·Just now# Help

Controlled Autocomplete (material-ui)

I'm creating a form that contains two fields: country and region. If the Country component is a Textfield, the behavior is as expected: when the Country component value is equal to "France", the Region component is an Autocomplete filled with the departements of France;…

thumbsup
0
message-simple
4

useFieldArray, remove an item, then add new item.

https://codesandbox.io/s/heuristic-lake-htt3t?fontsize=14&hidenavigation=1&theme=dark

thumbsup
0
message-simple
12

[SOLVED] Testing the onSubmit

I'm tired of banging my head against the wall, been doing it most of the day. So first of I am very new to the world of testing, so be kind when explaining please. I also have a hard time setting up a working codesandbox for this one, but I'll give you the code I am working with…

thumbsup
0
message-simple
12

useFieldArray, unable to remove item.

https://codesandbox.io/s/eager-water-47p27?fontsize=14&hidenavigation=1&theme=dark

thumbsup
0
message-simple
2

is It safe to memo form#control?

https://github.com/react-hook-form/react-hook-form/blob/master/src/useForm.ts#L1127 It looks like this object is not memorized, which cause Controller Input re-rendering. is is it safe to memo this object at application level? …

thumbsup
0
message-simple
4

How to do parse and format?

I'm migrating from "React Final Form" to "React Hook Form", everything works except currency input. I spent a couple hours and even try to build my own controller, But can't get it done. (For some reason, my own controller will cause infinity render when I convert value in…

thumbsup
0
message-simple
5

Empty array as default value, fieldArray

I'm having a heck of a time trying to figure out how to add elements to a field array that starts out empty. append doesn't seem to use the values passed to it: https://codesandbox.io/s/empty-field-array-o5t3d-o5t3d

thumbsup
0
message-simple
2

Material-UI Select Problem.

I am Trying to Use Material-Ui Select. As Soon as Form Component is rendered I am getting this Error:. When I am selecting an option getting this. const SignUpForm = (props) => { …

thumbsup
0
message-simple
1

useFieldArray and Controller

Removed

thumbsup
1
message-simple
7

After updating to version 4.9 from version 3 `defaultValues` don't work

Hey guys so I have forms like this After updating the lib, default values do not work anymore, whenever I open a form it's always empty, though the props are in place. Anybody knows what's going on here?

thumbsup
0
message-simple
35