In this post, we will see how to resolve AutoSelect in MUI
Question:
**How can I call the API onfocus in autocomplete in mui? Which property help me to achieve this? I have used the selectOnFocus property but not achieved the requirement.
**
Best Answer:
You have to useonOpen
prop.
And there is an example for it.https://mui.com/material-ui/react-autocomplete/#load-on-open
https://codesandbox.io/s/j8jnpe?file=/demo.tsx
Please check it.
If you have better answer, please add a comment about this, thank you!
Source: Stackoverflow.com