Skip to content

Commit

Permalink
[Autocomplete] Fix ListboxComponent slot regression (#25102)
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari authored Feb 26, 2021
1 parent a10d117 commit 5bd4cce
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion docs/src/pages/components/autocomplete/Virtualize.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import useMediaQuery from '@material-ui/core/useMediaQuery';
import ListSubheader from '@material-ui/core/ListSubheader';
import { useTheme, makeStyles } from '@material-ui/core/styles';
import { VariableSizeList } from 'react-window';
import { Typography } from '@material-ui/core';
import Typography from '@material-ui/core/Typography';

const LISTBOX_PADDING = 8; // px

Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/components/autocomplete/Virtualize.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import useMediaQuery from '@material-ui/core/useMediaQuery';
import ListSubheader from '@material-ui/core/ListSubheader';
import { useTheme, makeStyles } from '@material-ui/core/styles';
import { VariableSizeList, ListChildComponentProps } from 'react-window';
import { Typography } from '@material-ui/core';
import Typography from '@material-ui/core/Typography';

const LISTBOX_PADDING = 8; // px

Expand Down
7 changes: 2 additions & 5 deletions packages/material-ui/src/Autocomplete/Autocomplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -551,11 +551,7 @@ const Autocomplete = React.forwardRef(function Autocomplete(inProps, ref) {
>
{params.group}
</AutocompleteGroupLabel>
<AutocompleteGroupUl
as={ListboxComponent}
className={classes.groupUl}
styleProps={styleProps}
>
<AutocompleteGroupUl className={classes.groupUl} styleProps={styleProps}>
{params.children}
</AutocompleteGroupUl>
</li>
Expand Down Expand Up @@ -654,6 +650,7 @@ const Autocomplete = React.forwardRef(function Autocomplete(inProps, ref) {
) : null}
{groupedOptions.length > 0 ? (
<AutocompleteListbox
as={ListboxComponent}
className={classes.listbox}
styleProps={styleProps}
{...getListboxProps()}
Expand Down

0 comments on commit 5bd4cce

Please sign in to comment.