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

[Select] open/close indicator icon issue when endAdornment is set #45270

Open
nodirbekprogrammer opened this issue Feb 10, 2025 · 3 comments
Open
Assignees
Labels
component: select This is the name of the generic UI component, not the React module! status: waiting for author Issue with insufficient information

Comments

@nodirbekprogrammer
Copy link

nodirbekprogrammer commented Feb 10, 2025

Steps to reproduce

Steps:

  1. Open this link to live example: Link
  2. Click select indicator icon

Current behavior

When endAdornment is set, the menu does not appear when you click the open/close icon in select. But it does have focus.

Expected behavior

The menu should open or close when you click the open/close icon in any case.

Context

This is very important for the user experience. Almost all users click on that icon to open the menu.

Your environment

mui/material v6.4.3

Search keywords: select, endAdornment, indicator

@nodirbekprogrammer nodirbekprogrammer added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Feb 10, 2025
@nodirbekprogrammer nodirbekprogrammer changed the title open/close indicator icon issue when endAdornment is set select: open/close indicator icon issue when endAdornment is set Feb 10, 2025
@nodirbekprogrammer nodirbekprogrammer changed the title select: open/close indicator icon issue when endAdornment is set [Select]: open/close indicator icon issue when endAdornment is set Feb 10, 2025
@zannager zannager added the component: select This is the name of the generic UI component, not the React module! label Feb 10, 2025
@aarongarciah
Copy link
Member

Hi @nodirbekprogrammer, the endAdornment is on top of the Select's chevron icon, that's why it doesn't work. May I ask what's your use case for having an endAdornment in a Select? Having both the endAdornment and the chevron icon present at the same time is not ideal. You can hide the chevron icon using the IconComponent prop.

I think the only reason the endAdornment prop is supported in Select is because Select extends the OutlinedInput component.

@aarongarciah aarongarciah added status: waiting for author Issue with insufficient information and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Feb 11, 2025
@aarongarciah aarongarciah changed the title [Select]: open/close indicator icon issue when endAdornment is set [Select] open/close indicator icon issue when endAdornment is set Feb 11, 2025
@nodirbekprogrammer
Copy link
Author

Assalamu alaykum @aarongarciah. As I showed in the example, I need it to refetch data. Removing the chevron icon and leaving the refetch button alone looks very awkward and ugly. Surprisingly, this works without problems in AutoComplete. It would be great if these contextually similar components worked the same.

@github-actions github-actions bot added status: waiting for maintainer These issues haven't been looked at yet by a maintainer and removed status: waiting for author Issue with insufficient information labels Feb 11, 2025
@aarongarciah
Copy link
Member

@nodirbekprogrammer may I ask how do you handle this with the Autocomplete? AFAIK passing an endAdornment to the input hides the chevron (popupIcon) even when using the forcePopupIcon prop. See this example: https://codesandbox.io/p/sandbox/blazing-star-spc5v6

@aarongarciah aarongarciah added status: waiting for author Issue with insufficient information and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Feb 11, 2025
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! status: waiting for author Issue with insufficient information
Projects
None yet
Development

No branches or pull requests

4 participants