Closed josoroma-zz closed 3 years ago
Hi @josoroma, When do you think can this kind of cases (validation or error) can happen? Thanks, Iulian
I made it controllable by RHF:
const options: string[] = ["New York", "London", "Vienna", "Budapest"];
...
<Controller
name={name}
control={control}
variant={variant}
SelectProps={{
isCreatable: true,
msgNoOptionsAvailable: "All options are selected",
msgNoOptionsMatchFilter: "No option matches the filter",
}}
render={({ onChange, value }) => (
<MultipleSelect options={options} onChange={onChange} values={value} />
)}
/>
Now I am gonna add it errors handling I guess.
https://react-hook-form.com/get-started#IntegratingwithUIlibraries