HomeServicesOfAmerica / styled-material-components

Styled Components implementation of Material Design
Other
71 stars 51 forks source link

feat(menu): close by anchor #283

Closed AriLFrankel closed 6 years ago

AriLFrankel commented 6 years ago

In the current implementation, the anchorEl is always covered by the menu that it opens, and therefore cannot be clicked. When styles are passed in to override that behavior, the anchorEl closes then reopens the menu by firing onClose then flipping the open value in state.

This changes that behavior so that the menu will stay closed by preventing the onClose method from being fired when the anchorEl is clicked.