aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/components/ui/drop_down.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'packages/website/ts/components/ui/drop_down.tsx')
-rw-r--r--packages/website/ts/components/ui/drop_down.tsx13
1 files changed, 6 insertions, 7 deletions
diff --git a/packages/website/ts/components/ui/drop_down.tsx b/packages/website/ts/components/ui/drop_down.tsx
index 32105d353..638b29f88 100644
--- a/packages/website/ts/components/ui/drop_down.tsx
+++ b/packages/website/ts/components/ui/drop_down.tsx
@@ -32,8 +32,8 @@ export class DropDown extends React.Component<DropDownProps, DropDownState> {
public static defaultProps: Partial<DropDownProps> = {
style: DEFAULT_STYLE,
zDepth: 1,
- activateEvent: DropdownMouseEvent.Hover,
- closeEvent: DropdownMouseEvent.Hover,
+ activateEvent: DropdownMouseEvent.Click,
+ closeEvent: DropdownMouseEvent.Click,
};
private _popoverCloseCheckIntervalId: number;
public static getDerivedStateFromProps(props: DropDownProps, state: DropDownState): Partial<DropDownState> {
@@ -77,6 +77,8 @@ export class DropDown extends React.Component<DropDownProps, DropDownState> {
zIndex={this.props.zDepth}
>
<div
+ onMouseEnter={this._onHover.bind(this)}
+ onMouseLeave={this._onHoverOff.bind(this)}
onClick={this._closePopover.bind(this)}
>
{this.props.popoverContent}
@@ -95,13 +97,10 @@ export class DropDown extends React.Component<DropDownProps, DropDownState> {
}
}
private _onHover(event: React.FormEvent<HTMLInputElement>): void {
- this.setState({
- isHovering: true,
- anchorEl: event.currentTarget,
- });
+ this.setState({ isHovering: true });
}
private _onHoverOff(): void {
- this.setState({ isHovering: false, anchorEl: undefined });
+ this.setState({ isHovering: false });
}
private _checkIfShouldClosePopover(): void {
if (!this.state.isDropDownOpen) {