diff --git a/client/src/components/categorical/value.js b/client/src/components/categorical/value.js index 15c45d49..705412c9 100644 --- a/client/src/components/categorical/value.js +++ b/client/src/components/categorical/value.js @@ -13,23 +13,41 @@ import * as globals from "../../globals"; world: state.world })) class CategoryValue extends React.Component { - toggleOff() { + toggleOff = () => { const { dispatch, metadataField, categoryIndex } = this.props; dispatch({ type: "categorical metadata filter deselect", metadataField, categoryIndex }); - } + }; - toggleOn() { + toggleOn = () => { const { dispatch, metadataField, categoryIndex } = this.props; dispatch({ type: "categorical metadata filter select", metadataField, categoryIndex }); - } + }; + + handleMouseEnter = () => { + const { dispatch, metadataField, categoryIndex } = this.props; + dispatch({ + type: "category value mouse hover start", + metadataField, + categoryIndex + }); + }; + + handleMouseExit = () => { + const { dispatch, metadataField, categoryIndex } = this.props; + dispatch({ + type: "category value mouse hover end", + metadataField, + categoryIndex + }); + }; render() { const { @@ -79,6 +97,8 @@ class CategoryValue extends React.Component { justifyContent: "space-between" }} data-testclass="categorical-row" + onMouseEnter={this.handleMouseEnter} + onMouseLeave={this.handleMouseExit} >