I have used material UI component Autocomplete to render some options, but I want Autocomplete to let user avoid typing to get suggestion. Is there any way to make it work as select dropdown and blocking the textField input. Here, I can use Material UI select dropdown but is there anyway I can change autocomplete to select?
I have tried passing disabled to the TextField props but it looks like the complete dropdown is disable and still it allows to enter text.
Here is my component of autocomplete to reuse:
<Autocomplete
fullWidth
value={selected}
onChange={handleChange}
renderInput={(params) => <TextField {...params} {...getTextFieldProps({ value: value })} />}
{...getAutocompleteProps({ value: value })}
/>
handleChange
function just return immediately, without setting the value to state. – Tom BombadilSelect
component? – NearHuscarl