Skip to content

Commit e18b10d

Browse files
andreasheimoliviertassinari
authored andcommitted
[Autocomplete] Fix popup placement (#18289)
1 parent 0e0f17e commit e18b10d

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

docs/src/pages/components/autocomplete/GitHubLabel.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ export default function GitHubLabel() {
218218
getOptionLabel={option => option.name}
219219
renderInput={params => (
220220
<InputBase
221-
ref={params.ref}
221+
ref={params.InputProps.ref}
222222
inputProps={params.inputProps}
223223
autoFocus
224224
className={classes.inputBase}

docs/src/pages/components/autocomplete/GitHubLabel.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ export default function GitHubLabel() {
220220
getOptionLabel={(option: LabelType) => option.name}
221221
renderInput={params => (
222222
<InputBase
223-
ref={params.ref}
223+
ref={params.InputProps.ref}
224224
inputProps={params.inputProps}
225225
autoFocus
226226
className={classes.inputBase}

packages/material-ui-lab/src/Autocomplete/Autocomplete.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ export interface RenderGroupParams {
2323
}
2424

2525
export interface RenderInputParams {
26-
ref: React.Ref<any>;
2726
disabled: boolean;
2827
InputLabelProps: object;
2928
InputProps: {
29+
ref: React.Ref<any>;
3030
className: string;
3131
startAdornment: React.ReactNode;
3232
endAdornment: React.ReactNode;

packages/material-ui-lab/src/Autocomplete/Autocomplete.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,10 +288,10 @@ const Autocomplete = React.forwardRef(function Autocomplete(props, ref) {
288288
{...other}
289289
>
290290
{renderInput({
291-
ref: setAnchorEl,
292291
disabled,
293292
InputLabelProps: getInputLabelProps(),
294293
InputProps: {
294+
ref: setAnchorEl,
295295
className: classes.inputRoot,
296296
startAdornment,
297297
endAdornment: (

0 commit comments

Comments
 (0)