score:2
Accepted answer
i think you are missing props.value
and props.onchange(e)
and you may not need handlesalutationchange(e)
:
<controller
control={control}
name="salutation"
defaultvalue=""
rules={{ required: "salutation is required" }}
disabled={issubmitting}
render={(props) => (
<select
id="salutation"
{...props}
label="salutation"
options={salutation_items}
value={props.value} // this one: props.value
onchange={(e) => {
props.onchange(e) // i think you are missing this
handlesalutationchange(e) // not needed ?
}}
disableleftaddon={false}
rightchildren={
<riarrowdownsfill classname="dropdownarrow" />
}
/>
);
}}
/>
Source: stackoverflow.com
Related Query
- How to validate select input field using React Hook Form?
- Uploading a file using only the input field - React Hook Form
- How to add the input field inside the select option using ant design and react
- How to validate react-select dropdown using use form hook in react
- How can I validate an Autocomplete multiple TextField using React Hook Form and Yup?
- How can I validate array field in React Hook Form with the useFieldArray hook?
- How to validate the password and confirm password using the react hook form and yup
- How can i validate input field in react using regular expression via hooks
- How to validate react select dropdown list without using hook
- How to validate the two field in one object using react hook with yup
- How to pick React JS form input field value using Axios
- How to set multiple values at once in react hook form using Typescript
- React form hooks How to validate select option
- How to validate password and confirm password in react hook form? Is there any validate property and message in react hook form to show errors?
- How to format the value of a checkbox Field using React Final Form Field Array?
- Support callback for changing another field value when using React Hook Form validation
- React > How to set focus on the input field after adding a new row by using react-table
- How do I get my HTML form date input to only allow specific days of the week to be chosen using JavaScript, React and HTML?
- File input validation using React Hook Form and Yup
- Using React Hook Form with Material UI Select Component
- How to write a select field using the function React.createElement() in react
- How to set defaultValue after some delay on react select with react hook form
- How to input an existing value into an input field in React for an edit form
- How to select an input form that doesn't have a label with React testing library?
- show input field when other option is selected from select box using ionic react
- How to validate a numeric field value in react using Yup? I want to check if the number provided is in increments of 0.01 or 0.1
- How to pre-populate input field using Redux form
- how handle input errors validation in sub component react hook form
- How to Render Select Field using Redux Form and Semantic UI
- How to change color border bottom blue line to green green line in select field using react js?
More Query from same tag
- Dynamically mapping an array of objects to table row
- How can I add icon to react ag-grid rows?
- what is the alternate for depreciation for XMLHttpRequest for file-saver?
- id from url is shown undefined when used privateroute inside route component
- ReactJs: browse state element with map, TypeError: Cannot read property 'map' of undefined?
- How to change button text language on protable filters in Ant Design Pro
- Show new component on Click on specific element of Component
- Changing styles depends on state
- Conditional statements not rendering else block
- Remove some Specific Cell in Head Column
- (React) How to put focus on first element when component updates?
- Create custom component wrapper
- How to send text and formData in one fetch call
- Does this two useEffects makes a long loop?
- REACT - Preventing input after decimal place after 2 decimal places has been reached
- React calling dynamic state names
- React-typescript: Object is of type 'unknown'. TS2571
- Cannot figure out how to customize a D3 based plot
- How to efficiently call setState on both cases - succes and error?
- Can I pass information from componentDidCatch to getDerivedStateFromError?
- React Functional Component Re-renders exponentially with array state change
- Why isn't my document title property being updated?
- map function in React app showing only one result
- how to compile typescript with react definitions
- Multi Level JSON Filter
- Network Error / 403 Forbidden on request to a service React JS axios proxy
- How do I style an elements inside the navlinks when the navlinks got activated?
- Get the SUM of all inputted numbers in useState
- React-Redux: Dispatching on Constructor -> props.store.state not updated
- Proxy issue on calling express server from react server