Completely updated React, fixed #11, (hopefully)

This commit is contained in:
2018-03-04 19:11:49 -05:00
parent 6e0afd6e2a
commit 34e5f5139a
13674 changed files with 333464 additions and 473223 deletions

View File

@@ -97,7 +97,7 @@ var TableRow = function (_Component) {
var rowIndex = this.props.index + 1;
var cellIndex = e.target.cellIndex;
if (this.props.onRowClick) this.props.onRowClick(rowIndex, cellIndex);
if (this.props.onRowClick) this.props.onRowClick(rowIndex, cellIndex, e);
var _props = this.props,
selectRow = _props.selectRow,
unselectableRow = _props.unselectableRow,
@@ -118,26 +118,26 @@ var TableRow = function (_Component) {
setTimeout(function () {
if (_this2.clickNum === 1) {
onSelectRow(rowIndex, !isSelected, e);
onExpandRow(rowIndex, cellIndex);
onExpandRow(e, rowIndex, cellIndex);
}
_this2.clickNum = 0;
}, 200);
} else {
if (dbClickToEdit) {
this.expandRow(rowIndex, cellIndex);
this.expandRow(e, rowIndex, cellIndex);
}
}
}
}
}, {
key: '__expandRow__REACT_HOT_LOADER__',
value: function __expandRow__REACT_HOT_LOADER__(rowIndex, cellIndex) {
value: function __expandRow__REACT_HOT_LOADER__(event, rowIndex, cellIndex) {
var _this3 = this;
this.clickNum++;
setTimeout(function () {
if (_this3.clickNum === 1) {
_this3.props.onExpandRow(rowIndex, cellIndex);
_this3.props.onExpandRow(event, rowIndex, cellIndex);
}
_this3.clickNum = 0;
}, 200);
@@ -147,7 +147,7 @@ var TableRow = function (_Component) {
value: function __rowDoubleClick__REACT_HOT_LOADER__(e) {
if (e.target.tagName !== 'INPUT' && e.target.tagName !== 'SELECT' && e.target.tagName !== 'TEXTAREA') {
if (this.props.onRowDoubleClick) {
this.props.onRowDoubleClick(this.props.index);
this.props.onRowDoubleClick(this.props.index, e);
}
}
}
@@ -176,7 +176,8 @@ var TableRow = function (_Component) {
row = _props2.row,
isSelected = _props2.isSelected,
className = _props2.className,
index = _props2.index;
index = _props2.index,
hidden = _props2.hidden;
var style = this.props.style;
var backgroundColor = null;
@@ -208,6 +209,7 @@ var TableRow = function (_Component) {
onMouseOver: this.rowMouseOver,
onMouseOut: this.rowMouseOut,
onClick: this.rowClick,
hidden: hidden,
onDoubleClick: this.rowDoubleClick }),
this.props.children
);
@@ -229,11 +231,13 @@ TableRow.propTypes = {
onExpandRow: _propTypes2.default.func,
onRowMouseOut: _propTypes2.default.func,
onRowMouseOver: _propTypes2.default.func,
unselectableRow: _propTypes2.default.bool
unselectableRow: _propTypes2.default.bool,
hidden: _propTypes2.default.bool
};
TableRow.defaultProps = {
onRowClick: undefined,
onRowDoubleClick: undefined
onRowDoubleClick: undefined,
hidden: false
};
var _default = TableRow;
exports.default = _default;