[Autocomplete] MuiAutocomplete listbox is no longer a <ul> element #44264
Labels
component: autocomplete
This is the name of the generic UI component, not the React module!
status: waiting for maintainer
These issues haven't been looked at yet by a maintainer
v6.x migration
Steps to reproduce
Link to live example: (required)
https://codesandbox.io/embed/g6yktw?module=/src/Demo.tsx&fontsize=12
This is the
Combo Box
example on the doc for Autocomplete https://mui.com/material-ui/react-autocomplete/#combo-boxSteps:
div
element.Current behavior
The default listbox is a
div
element in V6.1.5e.g.
Expected behavior
The default listbox is a
ul
element in V5e.g.
Context
At first, I noticed there are some styling(spacing) issues after upgraded from V5 to V6 for my Autocomplete component.
After inspection, I noticed that there is a style previously applied in V5 which is -
ul ul { list-style-type: circle; margin-block-start: 0px; margin-block-end: 0px; }
However, whether or not this style still exist in V6 it will not be applied to the nested
ul
(MuiAutocomplete-groupUl), because now the listbox is adiv
element instead oful
element. I will need to override the margin(to 0px) manually to make it looks the same as in V5.I am not sure if this is bug or an undocumented change from V5 -> V6, or maybe it has documented some where else than the migration doc for V6 which I did not see.
Your environment
npx @mui/envinfo
Search keywords: autocomplete grouped listbox ul div
The text was updated successfully, but these errors were encountered: