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
The AutcompleteElement should render the tags like the Autocomplete component. When the value is present and the options are empty Array, the tags are still rendered properly in the regular Autocomplete component. This behavior should be the same for the AutocompleteElement component. https://codesandbox.io/p/sandbox/great-minsky-f8jvcn?file=%2Fsrc%2FDemo.tsx%3A23%2C41
The text was updated successfully, but these errors were encountered:
tt0mmy
changed the title
Autocomplete multiple tags are not rendering properly
Autocomplete multiple tags are not rendering when value exists and options is empty Array
Jun 12, 2024
Duplicates
Latest version
Current behavior 😯
The
AutocompleteElement
tags are not rendering properly compared to the regular controlledAutocomplete
from @mui/materialExpected behavior 🤔
The tags should be rendered properly like it did in version 6.
I suspect it's because of this https://github.com/dohomi/react-hook-form-mui/blob/master/packages/rhf-mui/src/AutocompleteElement.tsx#L210
Can we return just
newValue
instead of mapping it tomatchOptionByValue
?One workaround is to always include the
transform
prop.Steps to reproduce 🕹
The
AutcompleteElement
should render the tags like theAutocomplete
component. When the value is present and the options are empty Array, the tags are still rendered properly in the regularAutocomplete
component. This behavior should be the same for theAutocompleteElement
component.https://codesandbox.io/p/sandbox/great-minsky-f8jvcn?file=%2Fsrc%2FDemo.tsx%3A23%2C41
The text was updated successfully, but these errors were encountered: