[Autocomplete] disablePortal and classes.popperDisablePortal are not usable

See original GitHub issue
  • The issue is present in the latest release (@material-ui/lab@4.0.0-alpha.31).
  • I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior 😯

Material-UI: the key popperDisablePortal provided to the classes prop is not implemented in ForwardRef(Autocomplete). You can only override one of the following: root,focused,tag,inputRoot,input,inputFocused,clearIndicator,clearIndicatorDirty,popupIndicator,popupIndicatorOpen,popup,paper,listbox,loading,noOptions,option,groupLabel,groupUl.

Warning: React does not recognize the disablePortal prop on a DOM element.

Context 🔦

I am trying to design a custom autocomplete as per the example that reproduces the GitHub’s label picker found on: https://material-ui.com/components/autocomplete/

I don’t have to actually do a sandbox, because i checked the es, esm and ts versions of the Autocomplete inside node_modules, and i found that those props are NOT defined, so the error is legit.

Am i using the wrong lab version? Because whatever version is used on the material-ui website is NOT the one available to mortals.

Your Environment 🌎

Tech Version
Material-UI v4.6.0
React 16.9.0
Browser
TypeScript
etc.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:18 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
oliviertassinaricommented, Sep 22, 2020

Is that enough or are you looking for a code sandbox?

@bazfer We need a codesandbox with the minimum amount of code possible.

1reaction
marrakchimcommented, May 14, 2020

Same problem here, using disableCloseOnSelect with a controlled Autocomplete does not prevent the list from closing after select… Any news ?

Here is what my component looks like :

<Autocomplete
        options={options}
        value={value}
        disableCloseOnSelect
        onChange={handleChange}
        limitTags={4}
        getOptionLabel={(option) => option.name }
        renderOption={(option, { selected }) => (
          <React.Fragment>
            <Checkbox
              icon={icon}
              checkedIcon={checkedIcon}
              className={classes.checkbox}
              checked={selected}
            />
            {option.name}
          </React.Fragment>
        )}
        renderInput={(params) => (
          <TextField {...params}  variant="outlined" label={label} placeholder={label} />
        )}
        {...custom}
      />


Read more comments on GitHub >

github_iconTop Results From Across the Web

[Autocomplete] disablePortal and classes ... - GitHub
[Autocomplete] disablePortal and classes.popperDisablePortal are not usable #18305 ; Current Behavior ; Context ; Your Environment ...
Read more >
Mui 5 Autocomplete disablePortal prop not working
I was using previous Mui version 4.11.4 with the Autocomplete component and everything worked well with the disablePortal prop.
Read more >
Autocomplete API - Material UI - MUI
Name Type Default options * array renderInput * func autoComplete bool false
Read more >
React JS Autocomplete With Add New Option - Medium
I was building an Invoicing application that required me to enter Client/Customer details for invoice generation.
Read more >
React/Material UI - Prevent body scrolling on popover-Reactjs
I had a similar problem and solve it using 'disablePortal' Autocomplete property: ... Material UI popover not working with react class component ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found