Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[material-ui][Select] Remove focus from the input when the listbox disappears #42091

Open
vadaviya638 opened this issue May 2, 2024 · 0 comments
Assignees
Labels
component: select This is the name of the generic UI component, not the React module! package: material-ui Specific to @mui/material status: waiting for maintainer These issues haven't been looked at yet by a maintainer

Comments

@vadaviya638
Copy link

vadaviya638 commented May 2, 2024

Steps to reproduce

Link to live example: https://stackblitz.com/edit/vitejs-vite-kzseur?file=src%2FApp.tsx

Current behavior

Make a simple multiple select using Material UI's Select component. But one thing that I did not like is that if you unselect anything or just don't select anything and click outside, the dropdown disappears but the label remains focused until you click again or focus on other component.

Screenshot from 2024-05-02 10-23-20

Link to component: https://material-ui.com/demos/selects/

Original title for ease of reading:

Make a simple multiple select using Material UI's Select component. But one thing that I did not like is that if you unselect anything or just don't select anything and click outside, the dropdown disappears but the label remains focused until you click again or focus on other component.

Expected behavior

dropdown disappears then label focus also remove

Search keywords: select, dropdown , menu

@vadaviya638 vadaviya638 added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label May 2, 2024
@danilo-leal danilo-leal changed the title make a simple multiple select using Material-UI's Select component. But one thing that I did not like is that if you unselect anything or just don't select anything and click outside, the dropdown disappears but the label remains focused until you click again or focus on other component. [material-ui][Select] Remove focus from the input when the listbox disappears May 3, 2024
@danilo-leal danilo-leal added component: select This is the name of the generic UI component, not the React module! package: material-ui Specific to @mui/material labels May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: select This is the name of the generic UI component, not the React module! package: material-ui Specific to @mui/material status: waiting for maintainer These issues haven't been looked at yet by a maintainer
Projects
None yet
Development

No branches or pull requests

3 participants