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

Autocomplete popupIcon icon is turning down #41910

Closed
FreakDroid opened this issue Apr 12, 2024 · 3 comments
Closed

Autocomplete popupIcon icon is turning down #41910

FreakDroid opened this issue Apr 12, 2024 · 3 comments
Labels
component: autocomplete This is the name of the generic UI component, not the React module!

Comments

@FreakDroid
Copy link

FreakDroid commented Apr 12, 2024

Steps to reproduce

Link to live example: Demo

Steps:

  1. See the icon in the autocomplete
  2. Click the autocomplete to search any value
  3. See the icon turning down.

Current behavior

In the autocomplete component the popupIcon (custom icon) is turning down when the autocomplete is opened.

Closed:
Screenshot 2024-04-11 at 17 57 03

Opened:
Screenshot 2024-04-11 at 17 57 09

Expected behavior

If the icon is not an arrow, the orientation should be kept. Probably can we give to the user the option to decide whether to flip the icon or not.

Context

No response

Your environment

npx @mui/envinfo
  Don't forget to mention which browser you used.
  Output from `npx @mui/envinfo` goes here.

Search keywords: Autocomplete custom icon
Order ID: 77137

Search keywords:

@FreakDroid FreakDroid added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Apr 12, 2024
@korkt-kim
Copy link

you can solve the problem like this way

export default function ComboBox() {
  return (
    <Autocomplete
      disablePortal
      id="combo-box-demo"
      options={top100Films}
      sx={{
        width: 300,
        "& .MuiAutocomplete-popupIndicator": { transform: "none" }, // added
      }}
      open={true}
      forcePopupIcon={true}
      clearIcon={<SearchIcon fontSize="small" />}
      popupIcon={<SearchIcon fontSize="small" />}
      renderInput={(params) => <TextField {...params} label="Movie" />}
    />
  );
}

@FreakDroid
Copy link
Author

@korkt-kim Thanks for that this resolve my issue.

@github-actions github-actions bot removed the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Apr 15, 2024
Copy link

⚠️ This issue has been closed. If you have a similar problem but not exactly the same, please open a new issue.
Now, if you have additional information related to this issue or things that could help future readers, feel free to leave a comment.

@FreakDroid: How did we do? Your experience with our support team matters to us. If you have a moment, please share your thoughts in this short Support Satisfaction survey.

@zannager zannager transferred this issue from mui/mui-x Apr 15, 2024
@zannager zannager added the component: autocomplete This is the name of the generic UI component, not the React module! label Apr 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: autocomplete This is the name of the generic UI component, not the React module!
Projects
None yet
Development

No branches or pull requests

3 participants