Questions tagged [react-hook-form]
React form library using hooks
react-hook-form
2,599
questions
0
votes
0
answers
14
views
Adding objects within a specific Array type in React TypeScript
I'm writting the shchema of my web app by Zod and I'm creatig different message errors to input objects. A minimum length for one and a user verified in the other case.
The minimum length condition ...
0
votes
0
answers
7
views
MUI stepper should not allow to next step with react-hook-form
I have a MUI stepper and each step has react-hook-form. I don't want to allow user to move next step if form validation fails on click of next button of Stepper. Any suggestion would be appreciated. ...
0
votes
1
answer
21
views
react-hook-form: Expected 6 arguments, but got 1
interface SampleProps {
firstName: string;
address: object;
contact: string | Date | any;
}
const {
register,
handleSubmit,
control,
formState: { errors },
getValues,
} = ...
0
votes
0
answers
14
views
How to use custom function in onChange event handler in React-Hook-Form?
I want to create a form with two MUI Select components. Conference and division are inter-related. Their relationships are described below.
There is a conference corresponding to each division, as ...
0
votes
0
answers
26
views
Why does my handle click not working when resetting field to empty?
I created an update function wherein there is a specific function in my radio button wherein if the user selected no/none it will reset the other form into empty string or make it null, but the ...
0
votes
1
answer
19
views
Why doesn't webstorm/react-hook-forms tell me possible options for name?
I want to make components with inputs, but at the moment I have a problem that with the current implementation I don’t have tooltips for name, but I would like form fields to be displayed in name.
...
0
votes
1
answer
17
views
How to send file data to server action using next-safe-action & react-hook-form
I've created an input and received the file, I can see the data stored in formData, but when I send them to the server-action I receive this error:
Uncaught (in promise) Error: Only plain objects, and ...
0
votes
2
answers
25
views
Why the form property not working on MUI button as like html button field?
I need to submit the form with react hook form with zod validation. But in my condition, the submit button was outside of the form tag. So I used the id form method. ( please sudjust any other method ...
0
votes
0
answers
27
views
Warning: Maximum update depth exceeded. on react-hook-form unregister set state
i've got Maximum update depth exceeded aka "infinite loop" in my react-lifecycle, i've handled it with unmounted but my code still error.
this bellow is my current conditional code using ...
0
votes
0
answers
11
views
shadcn storing state in searchParam queries and nextjs 14
i have a shadcn form component that has Dialog, inside is is a form with Select,input, textArea, updloadPicture ( with uploadthing) and Switch. in another component i set a query to call a my api ...
0
votes
0
answers
13
views
Why is my file upload not preserving the file extension and logging as 'undefined' on the client side?
when i upload my file, on the client side in the console I get undefined but on the server side in the console, I get information about the file i uploaded but it doesn't include the file extension. ...
-1
votes
1
answer
29
views
react-hook-form useController with html5 list (select)
react-hook-form is properly set up, i'm using defaultValues
I'm trying to use html 5 and list for a dropdown box
but the status of '1' appears in the box instead of it's related option text.
slightly ...
0
votes
1
answer
18
views
react-hook-form controller with auto update value on mount
I need to make it so that the value is set automatically when mounted. From outside the component I can't set it, because I have scripts when data retrieval requests happen in the component
The ...
0
votes
1
answer
37
views
Why in my submit MUi button in react hook form neither logging on console nor sending data on mongoDB?
I don't understand why my react hook form built with Integration of Controller with various Mui Components such as TextFields Date Picker and Time Pickers two react select components for dropDown menu,...
0
votes
0
answers
33
views
When using react-select components with react-hook-form inside a Radix UI Sheet or Modal, the tabindex does not work
I have a saas project where I use React hook form and shadcn-ui. when I run the form I created in nextjs page, I can use it without any problem. When I use the form in sheet component, tabindex does ...