[question] How can I render a specific value in an Autocomplete component differently? #42087
Labels
component: autocomplete
This is the name of the generic UI component, not the React module!
component: text field
This is the name of the generic UI component, not the React module!
status: waiting for maintainer
These issues haven't been looked at yet by a maintainer
support: commercial
The problem in depth
I have an
Autocomplete
component which I'm using with a standardTextField
input like this:It is possible for my options to have a label that is blank (
''
), and when this happens I want to avoid showing an empty value in the input.Instead, I'd like to show the text [blank] - which is what I've done for the options using
renderOption
.So far, I haven't been able to get it working. I've tried assigning the
TextField
component inrenderInput
a value directly:Your environment
`npx @mui/envinfo`
Search keywords: textfield, autocomplete, render
Order ID: 82553
Search keywords:
The text was updated successfully, but these errors were encountered: