diff options
author | Fabio Berger <me@fabioberger.com> | 2018-10-11 19:33:49 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-10-11 19:33:49 +0800 |
commit | 636ce6331bf854d6b7b12a1e87929a5a55184062 (patch) | |
tree | 093a724f14aac582fd68bb018189db09b2cc4c81 /packages/website/ts | |
parent | 0fd158ac64f076859c296c641bdd2027971d8ac1 (diff) | |
download | dexon-0x-contracts-636ce6331bf854d6b7b12a1e87929a5a55184062.tar.gz dexon-0x-contracts-636ce6331bf854d6b7b12a1e87929a5a55184062.tar.zst dexon-0x-contracts-636ce6331bf854d6b7b12a1e87929a5a55184062.zip |
fix(website): Avoid hover activated dropdown from closing when activeNode is clicked
Diffstat (limited to 'packages/website/ts')
-rw-r--r-- | packages/website/ts/components/ui/drop_down.tsx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/packages/website/ts/components/ui/drop_down.tsx b/packages/website/ts/components/ui/drop_down.tsx index 1daaeb1c3..9044b218d 100644 --- a/packages/website/ts/components/ui/drop_down.tsx +++ b/packages/website/ts/components/ui/drop_down.tsx @@ -1,3 +1,4 @@ +import * as _ from 'lodash'; import Popover from 'material-ui/Popover'; import * as React from 'react'; import { MaterialUIPosition } from 'ts/types'; @@ -75,7 +76,11 @@ export class DropDown extends React.Component<DropDownProps, DropDownState> { anchorEl={this.state.anchorEl} anchorOrigin={this.props.anchorOrigin} targetOrigin={this.props.targetOrigin} - onRequestClose={this._closePopover.bind(this)} + onRequestClose={ + this.props.closeEvent === DropdownMouseEvent.Click + ? this._closePopover.bind(this) + : _.noop.bind(_) + } useLayerForClickAway={this.props.closeEvent === DropdownMouseEvent.Click} animated={false} zDepth={this.props.zDepth} |