aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-10-11 19:33:49 +0800
committerFabio Berger <me@fabioberger.com>2018-10-11 19:33:49 +0800
commit636ce6331bf854d6b7b12a1e87929a5a55184062 (patch)
tree093a724f14aac582fd68bb018189db09b2cc4c81
parent0fd158ac64f076859c296c641bdd2027971d8ac1 (diff)
downloaddexon-sol-tools-636ce6331bf854d6b7b12a1e87929a5a55184062.tar
dexon-sol-tools-636ce6331bf854d6b7b12a1e87929a5a55184062.tar.gz
dexon-sol-tools-636ce6331bf854d6b7b12a1e87929a5a55184062.tar.bz2
dexon-sol-tools-636ce6331bf854d6b7b12a1e87929a5a55184062.tar.lz
dexon-sol-tools-636ce6331bf854d6b7b12a1e87929a5a55184062.tar.xz
dexon-sol-tools-636ce6331bf854d6b7b12a1e87929a5a55184062.tar.zst
dexon-sol-tools-636ce6331bf854d6b7b12a1e87929a5a55184062.zip
fix(website): Avoid hover activated dropdown from closing when activeNode is clicked
-rw-r--r--packages/website/ts/components/ui/drop_down.tsx7
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}