Skip to content

Commit

Permalink
another cover fix #1
Browse files Browse the repository at this point in the history
  • Loading branch information
4edorov committed Feb 3, 2018
1 parent 0180ce1 commit be11aeb
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/Cell.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,15 @@ const connector = connect(
class Cell extends React.Component {

handleClick = e => {
if (e.detail === 1) {
this.props.dispatch(setEditingCoords(-1, -1))
}
this.props.dispatch(setEditingCoords(-1, -1))
}

handleInputClick = e => {
e.stopPropagation()
}

handleDoubleClick = () => {
if (this.props.colDef.editable) {
this.props.dispatch(setEditingCoords(this.props.index, this.props.colDef.key))
}
this.props.dispatch(setEditingCoords(this.props.index, this.props.colDef.key))
}

handleRelease = () => {
Expand All @@ -51,7 +47,7 @@ class Cell extends React.Component {
<div
className="rsg-cell rsg-body-cell"
style={{left, width}}
onDoubleClick={this.handleDoubleClick}
onDoubleClick={this.props.colDef.editable && this.handleDoubleClick}
onClick={this.handleClick}
>
{Component && editable && this.props.editing ?
Expand Down

0 comments on commit be11aeb

Please sign in to comment.