You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are thanksful users of the library and are using quite some components to unify MUI and RHF. We've built an abstraction function that uses the AutocompleteElement and does some styling around it, so nothing special.
As Properties, we wanted to use the built in AutocompleteElementProps type. However, when we want to use the freeSolo property on the autocompleteProps, we get an error stating that only false and undefined may be applied.
We've currently built a fix by explicitly defining the generic extended types, however we thought it would be cool to fix that for everyone as it seems to be a minor issue.
We hope that just removing the default value of false, which shouldn't be explicitly needed, would do the trick but are of course open to everything else that might fix that hiccup.
We are currently using version 7.4.0, but we also tried 7.4.1 which still seems to have that issue. Thanks a lot in advance!
Expected behavior 🤔
The freeSolo type in the autocompleteProps should be boolean and not false | undefined.
Steps to reproduce 🕹
Steps:
Create a wrapper component using the AutocompleteElementProps type from react-hook-form-mui as property type.
Use the wrapper component and pass autocompleteProps={{ freeSolo: true }}
A Typescript error should appear.
The text was updated successfully, but these errors were encountered:
Duplicates
Latest version
Current behavior 😯
We are thanksful users of the library and are using quite some components to unify MUI and RHF. We've built an abstraction function that uses the
AutocompleteElement
and does some styling around it, so nothing special.As Properties, we wanted to use the built in
AutocompleteElementProps
type. However, when we want to use thefreeSolo
property on theautocompleteProps
, we get an error stating that only false and undefined may be applied.We've currently built a fix by explicitly defining the generic extended types, however we thought it would be cool to fix that for everyone as it seems to be a minor issue.
We hope that just removing the default value of false, which shouldn't be explicitly needed, would do the trick but are of course open to everything else that might fix that hiccup.
We are currently using version 7.4.0, but we also tried 7.4.1 which still seems to have that issue. Thanks a lot in advance!
Expected behavior 🤔
The
freeSolo
type in theautocompleteProps
should beboolean
and notfalse | undefined
.Steps to reproduce 🕹
Steps:
AutocompleteElementProps
type fromreact-hook-form-mui
as property type.autocompleteProps={{ freeSolo: true }}
The text was updated successfully, but these errors were encountered: