Skip to content

Commit

Permalink
[Autocomplete] Fix popup placement (#18289)
Browse files Browse the repository at this point in the history
  • Loading branch information
andreasheim authored and oliviertassinari committed Nov 11, 2019
1 parent 0e0f17e commit e18b10d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/src/pages/components/autocomplete/GitHubLabel.js
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ export default function GitHubLabel() {
getOptionLabel={option => option.name}
renderInput={params => (
<InputBase
ref={params.ref}
ref={params.InputProps.ref}
inputProps={params.inputProps}
autoFocus
className={classes.inputBase}
Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/components/autocomplete/GitHubLabel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ export default function GitHubLabel() {
getOptionLabel={(option: LabelType) => option.name}
renderInput={params => (
<InputBase
ref={params.ref}
ref={params.InputProps.ref}
inputProps={params.inputProps}
autoFocus
className={classes.inputBase}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ export interface RenderGroupParams {
}

export interface RenderInputParams {
ref: React.Ref<any>;
disabled: boolean;
InputLabelProps: object;
InputProps: {
ref: React.Ref<any>;
className: string;
startAdornment: React.ReactNode;
endAdornment: React.ReactNode;
Expand Down
2 changes: 1 addition & 1 deletion packages/material-ui-lab/src/Autocomplete/Autocomplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -288,10 +288,10 @@ const Autocomplete = React.forwardRef(function Autocomplete(props, ref) {
{...other}
>
{renderInput({
ref: setAnchorEl,
disabled,
InputLabelProps: getInputLabelProps(),
InputProps: {
ref: setAnchorEl,
className: classes.inputRoot,
startAdornment,
endAdornment: (
Expand Down

0 comments on commit e18b10d

Please sign in to comment.