Comparing version 0.1.7 to 0.2.0
@@ -340,17 +340,17 @@ 'use strict'; | ||
if (selectedColumn && !isDragging) { | ||
_this3.props.onHeaderClick(selectedColumn); | ||
} | ||
if (selectedColumn) { | ||
if (!isDragging) { | ||
_this3.props.onHeaderClick(selectedColumn); | ||
} else if (!orderedIds.every(function (id, i) { | ||
return id === selectedColumns[i]; | ||
})) { | ||
_this3.props.onColumnChange(orderedIds); | ||
} | ||
if (!orderedIds.every(function (id, i) { | ||
return id === selectedColumns[i]; | ||
})) { | ||
_this3.props.onColumnChange(orderedIds); | ||
_this3.setState({ | ||
selectedColumn: null, | ||
mouseXFromColumn: 0, | ||
isDragging: false | ||
}); | ||
} | ||
_this3.setState({ | ||
selectedColumn: null, | ||
mouseXFromColumn: 0, | ||
isDragging: false | ||
}); | ||
}; | ||
@@ -357,0 +357,0 @@ |
{ | ||
"name": "galahad", | ||
"version": "0.1.7", | ||
"version": "0.2.0", | ||
"description": "It's a data table, made in React.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -180,15 +180,15 @@ // @flow | ||
if (selectedColumn && !isDragging) { | ||
this.props.onHeaderClick(selectedColumn) | ||
} | ||
if (selectedColumn) { | ||
if (!isDragging) { | ||
this.props.onHeaderClick(selectedColumn) | ||
} else if (!orderedIds.every((id, i) => id === selectedColumns[i])) { | ||
this.props.onColumnChange(orderedIds) | ||
} | ||
if (!orderedIds.every((id, i) => id === selectedColumns[i])) { | ||
this.props.onColumnChange(orderedIds) | ||
this.setState({ | ||
selectedColumn: null, | ||
mouseXFromColumn: 0, | ||
isDragging: false | ||
}) | ||
} | ||
this.setState({ | ||
selectedColumn: null, | ||
mouseXFromColumn: 0, | ||
isDragging: false | ||
}) | ||
} | ||
@@ -195,0 +195,0 @@ |
Sorry, the diff of this file is not supported yet
257245
1474