Reset hoverTime on mouse leave instead of mouse out
parent
da8d8804e1
commit
0d628bfdab
|
@ -59,8 +59,8 @@ class TableGraph extends Component {
|
||||||
super(props)
|
super(props)
|
||||||
this.state = {
|
this.state = {
|
||||||
data: [[]],
|
data: [[]],
|
||||||
timeColumnWidth: calculateTimeColumnWidth(props.tableOptions.timeFormat),
|
|
||||||
processedData: [[]],
|
processedData: [[]],
|
||||||
|
timeColumnWidth: calculateTimeColumnWidth(props.tableOptions.timeFormat),
|
||||||
hoveredColumnIndex: NULL_ARRAY_INDEX,
|
hoveredColumnIndex: NULL_ARRAY_INDEX,
|
||||||
hoveredRowIndex: NULL_ARRAY_INDEX,
|
hoveredRowIndex: NULL_ARRAY_INDEX,
|
||||||
sortField: '',
|
sortField: '',
|
||||||
|
@ -139,7 +139,7 @@ class TableGraph extends Component {
|
||||||
handleHover = (columnIndex, rowIndex) => () => {
|
handleHover = (columnIndex, rowIndex) => () => {
|
||||||
const {onSetHoverTime, tableOptions: {verticalTimeAxis}} = this.props
|
const {onSetHoverTime, tableOptions: {verticalTimeAxis}} = this.props
|
||||||
const {data} = this.state
|
const {data} = this.state
|
||||||
if (rowIndex === 0 && verticalTimeAxis) {
|
if (verticalTimeAxis && rowIndex === 0) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (onSetHoverTime) {
|
if (onSetHoverTime) {
|
||||||
|
@ -154,7 +154,7 @@ class TableGraph extends Component {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
handleMouseOut = () => {
|
handleMouseLeave = () => {
|
||||||
if (this.props.onSetHoverTime) {
|
if (this.props.onSetHoverTime) {
|
||||||
this.props.onSetHoverTime(NULL_HOVER_TIME)
|
this.props.onSetHoverTime(NULL_HOVER_TIME)
|
||||||
this.setState({
|
this.setState({
|
||||||
|
@ -344,7 +344,7 @@ class TableGraph extends Component {
|
||||||
<div
|
<div
|
||||||
className="table-graph-container"
|
className="table-graph-container"
|
||||||
ref={gridContainer => (this.gridContainer = gridContainer)}
|
ref={gridContainer => (this.gridContainer = gridContainer)}
|
||||||
onMouseOut={this.handleMouseOut}
|
onMouseLeave={this.handleMouseLeave}
|
||||||
>
|
>
|
||||||
{rowCount > 0 && (
|
{rowCount > 0 && (
|
||||||
<ColumnSizer
|
<ColumnSizer
|
||||||
|
|
Loading…
Reference in New Issue