menu
Channels
Chat
view-forward
# All channels
view-forward
# General
view-forward
# Help
view-forward
Team
Posts
Members
Info

Syntax error on jest with @hookform/resolvers

Node versions tried: 12.20.0 and 14.15.4. I have @testing-library/jest-dom on my jest setup file. For context, I can write tests fine with @testing-library/react for any forms given that I don't use the package @hookform/resolvers. I can implement form validation manually…

thumbsup
0
message-simple
11

Default values only applied to 1 field?

Could anyone help me figure out what I'm doing wrong with my form? Code Sandbox: https://codesandbox.io/embed/react-hook-form-input-components-test-xoofd For some reason, only 1 of the 3 default values is being filled by the form. When the form initializes, the getValues() does…

thumbsup
0
message-simple
0
Deleted·7d# Help

Material UI checkbox not getting selected as compared to normal checkbox

On changing a text field I am manually setting checkboxes to true. Normal checkbox getting checked but Material ui checkbox not getting checked. However after submitting the form true value is reflecting for both the checkboxes. Demo…

thumbsup
0
message-simple
0

Confusion around watch and default values

Im just joining a team who the old guy is not around anymore, he set up all of our stuff with react-hook-forms. Looking at the code, What I need to do is through the parent or between the two items, is dynamically set the value of a text box, when a dropdown value is selected.…

thumbsup
0
message-simple
0

how can you trigger validation on the entire field array or just one item insid

if you have a field array with name of "test" that is an array of objects, how can you trigger validation on the entire field array or even just one item in the array? I thought trigger("test") would validate all of them but it doesnt. Also trigger("test[0])". I'd prefer this so…

thumbsup
0
message-simple
2

type methods = useForm<>()

how would the type, for the property methods, look like?

thumbsup
0
message-simple
0

How to add validation in react-google-recaptcha?

Hi , here i am having a form where the user enter the values and hit the sumbit button. its a normal form but it values are required so i added react-hook-form { required: true } option in it. Its working fine. Now i have added react-google-recaptcha init. But i dont know how to…

thumbsup
0
message-simple
3

useFieldArray doesn't update fields

I've created a sandbox based on David Krause's (thanks David!) to illustrate my problem, but basically I'm struggling with how to watch an array of values. https://codesandbox.io/s/react-hook-form-usefieldarray-modular-7g552?fontsize=14&hidenavigation=1&theme=dark The example…

thumbsup
0
message-simple
88

useFieldArray and material-table not working properly

Hi Team, I'm currently trying to use material-table (https://material-table.com/#/) in conjunction with react-hook-form. While it works smoothly most of the time, I sometimes experience very weird behaviour. I'm not completely sure whether this is the right place to post the…

thumbsup
0
message-simple
6

React-select value

Hi) Can I get value from react-select multi using React-Hook-Form before submitting ? I use Controller for react-select

thumbsup
0
message-simple
2