Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How not to spin mui autocomplete popup icon?

how not to spin search icon after open autocomplete input?

<Autocomplete
  popupIcon={<Search />}
  onChange={(e, value) => handleFound(value)}
  options={['0', '2', '3', '1']}
  sx={{ width: '100%' }}
  renderInput={(params) =>
    <TextField {...params} placeholder={'type anything...'} />
  }
/>
like image 413
chupapee Avatar asked Dec 04 '25 14:12

chupapee


1 Answers

You need to stop the rotation from the popup indicator styles, like this:

<Autocomplete
  popupIcon={<Search />}
  onChange={(e, value) => handleFound(value)}
  options={["0", "2", "3", "1"]}
  sx={{
    width: "100%",
    "& .MuiAutocomplete-popupIndicator": { transform: "none" },
  }}
  renderInput={(params) => (
    <TextField {...params} placeholder={"type anything..."} />
  )}
/>

Note that this is not the only solution but in my opinion is the fastest...

like image 74
Dobromir Kirov Avatar answered Dec 07 '25 10:12

Dobromir Kirov



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!