-
-
Notifications
You must be signed in to change notification settings - Fork 32.8k
Description
- The issue is present in the latest release.
- I have searched the issues of this repository and believe that this is not a duplicate.
Current Behavior 😯
The dropdown is not shown on clicking the "Add Labels" button.
Expected Behavior 🤔
The popper should be opened and we would be able to see the content inside it i.e. the "Autocomplete" component.
Steps to Reproduce 🕹
I have added a sandbox for the above mentioned steps. Kindly have a look into it.
https://codesandbox.io/s/blissful-dewdney-utnpv
Context 🔦
I have a use case where I need to open up the autocomplete API on top of a Dialog component, however the dropdown never seems to appear. I debugged the following issue and I found that when I click on the "add labels" option it sets the "anchorEl" as it should do, thanks to the "handleClick" function, but immediately after that the "onClose" prop of "Autocomplete" component gets fired which sets the "anchorEl" back to null. Therefore the dropdown never seems to appear. Again on digging deeper, I logged the "reason" variable provided to "handleClose" which shows an event "blur" when I click on the element to display the dropdown.
Your Environment 🌎
| Tech | Version |
|---|---|
| Material-UI | v4.9.7 |
| React | 16.13.1 |
| Browser | Firefox |
| TypeScript | 3.6.4 |
| etc. |