add comment to clarify fix
This commit is contained in:
parent
be6f93ac71
commit
ed6c282572
1 changed files with 3 additions and 2 deletions
|
@ -69,7 +69,8 @@ export class DropDownMenu extends React.PureComponent {
|
|||
});
|
||||
}
|
||||
|
||||
handleWindowClick = (e) => {
|
||||
/*this will force "this" to always be the class, even when passed to an event listener*/
|
||||
handleWindowClick = e => {
|
||||
if (
|
||||
this.state.menuOpen &&
|
||||
(!this._menuDiv || !this._menuDiv.contains(e.target))
|
||||
|
@ -78,7 +79,7 @@ export class DropDownMenu extends React.PureComponent {
|
|||
menuOpen: false,
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
if (!this.state.menuOpen && this._isWindowClickBound) {
|
||||
|
|
Loading…
Reference in a new issue