menu

React Hook Form

📋 Custom React hooks for form validation without the hassle

Channels
Team
Posts
Members
Info

How to find out which submit button has been clicked onSubmit?

Right now my team is discovering on how to find out which submit button has been clicked (when there are multiple submit buttons). F.e. if you have an invitation form, where you can either submit your party acception or your party declining (acceptButton has value="accept",…

thumbsup
0
message-simple
11

Possible bug with field arrays ending up in an empty object

I am trying to work the new useFieldArray into my code, but running into a problem with properly maintaining the array of objects. Here is a simple sandbox to show the issue I am seeing: https://codesandbox.io/s/react-hook-form-usefieldarray-f0v7b …

thumbsup
0
message-simple
21

Create a validation error if number of elements in array less than needed?

For example, the number should be 2

thumbsup
0
message-simple
6

What am I missing?

Hey, I'm testing out react-hook-form, but I can't seem to get the values to update with a deep nested component, useFormContext and Controller-component from APIs. Selecting values form the React-Select component inside my deeply nested component sets the values with setValue…

thumbsup
0
message-simple
6

loading async data with Material-UI TextField

calling reset() on Material-UI TextField overlaps label and value. Is there any solution to this yet?

thumbsup
0
message-simple
12

Field array & values - getting undefined

I'm struggling to implement field array pretty much identical to this example https://codesandbox.io/embed/6j1760jkjk the field values (e.g. field name='info[0].label') are undefined though instead of the user's input values here's a snippet (using Material UI components): …

thumbsup
0
message-simple
13

Is this stackoverflow answer from @bluebill1049 on controlling ant-design up to…

Is this advice still operative? https://stackoverflow.com/questions/58833574/how-to-use-react-hook-form-with-ant-design-or-material-ui It seems like using the new <Controller /> component is the operative advice.

thumbsup
0
message-simple
6

Importing ie11 dist build?

Hi! I'm using latest version 4.5.5 and get type errors when trying to import the ie-11 variant from the dist folder. Any suggestions? Thank you!

thumbsup
1
message-simple
4

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
8

useFieldArray Isn't Deleting Correct Index

I am still seeing issues in my implementation for useFieldArray in my code. As a result I have been trying to make a codesandox that I created resemble my code more closely: https://codesandbox.io/s/react-hook-form-usefieldarray-modular-robsu In this example: 1) Click Add …

thumbsup
0
message-simple
21