react-sheet
Advanced tools
Comparing version 0.0.27 to 0.0.28
@@ -37,2 +37,9 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
_this.onClick = function () { | ||
var onClick = _this.props.onClick; | ||
onClick && onClick(); | ||
}; | ||
_this.state = { | ||
@@ -73,2 +80,3 @@ tableHeight: null, | ||
{ | ||
onClick: this.onClick, | ||
ref: function ref(elem) { | ||
@@ -75,0 +83,0 @@ return _this2.dataTable = elem; |
@@ -236,4 +236,4 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | ||
_this.onOutsideClick = function (event) { | ||
if (!_this.keyWrapper.contains(event.target)) { | ||
if (_this.isVisible(_this.keyWrapper)) { | ||
if (!_this.elem.dataTable.contains(event.target)) { | ||
if (_this.isVisible(_this.elem.dataTable)) { | ||
_this.removeAllListeners(); | ||
@@ -278,23 +278,13 @@ } | ||
return React.createElement( | ||
'div', | ||
{ | ||
ref: function ref(elem) { | ||
return _this2.keyWrapper = elem; | ||
}, | ||
className: 'key-events', | ||
onClick: this.addListeners, | ||
onBlur: this.removeListeners | ||
return React.createElement(WrappedComponent, _extends({ | ||
ref: function ref(elem) { | ||
return _this2.elem = elem; | ||
}, | ||
React.createElement(WrappedComponent, _extends({ | ||
ref: function ref(elem) { | ||
_this2.keyWrapper = elem; | ||
}, | ||
focus: this.focus, | ||
selection: selection, | ||
onEnter: this.onEnter, | ||
focusedCell: focusedCell, | ||
setSelection: this.setSelection | ||
}, this.props)) | ||
); | ||
focus: this.focus, | ||
onClick: this.addListeners, | ||
selection: selection, | ||
onEnter: this.onEnter, | ||
focusedCell: focusedCell, | ||
setSelection: this.setSelection | ||
}, this.props)); | ||
}; | ||
@@ -301,0 +291,0 @@ |
@@ -55,2 +55,9 @@ 'use strict'; | ||
_this.onClick = function () { | ||
var onClick = _this.props.onClick; | ||
onClick && onClick(); | ||
}; | ||
_this.state = { | ||
@@ -91,2 +98,3 @@ tableHeight: null, | ||
{ | ||
onClick: this.onClick, | ||
ref: function ref(elem) { | ||
@@ -93,0 +101,0 @@ return _this2.dataTable = elem; |
@@ -251,4 +251,4 @@ 'use strict'; | ||
_this.onOutsideClick = function (event) { | ||
if (!_this.keyWrapper.contains(event.target)) { | ||
if (_this.isVisible(_this.keyWrapper)) { | ||
if (!_this.elem.dataTable.contains(event.target)) { | ||
if (_this.isVisible(_this.elem.dataTable)) { | ||
_this.removeAllListeners(); | ||
@@ -293,23 +293,13 @@ } | ||
return _react2.default.createElement( | ||
'div', | ||
{ | ||
ref: function ref(elem) { | ||
return _this2.keyWrapper = elem; | ||
}, | ||
className: 'key-events', | ||
onClick: this.addListeners, | ||
onBlur: this.removeListeners | ||
return _react2.default.createElement(WrappedComponent, _extends({ | ||
ref: function ref(elem) { | ||
return _this2.elem = elem; | ||
}, | ||
_react2.default.createElement(WrappedComponent, _extends({ | ||
ref: function ref(elem) { | ||
_this2.keyWrapper = elem; | ||
}, | ||
focus: this.focus, | ||
selection: selection, | ||
onEnter: this.onEnter, | ||
focusedCell: focusedCell, | ||
setSelection: this.setSelection | ||
}, this.props)) | ||
); | ||
focus: this.focus, | ||
onClick: this.addListeners, | ||
selection: selection, | ||
onEnter: this.onEnter, | ||
focusedCell: focusedCell, | ||
setSelection: this.setSelection | ||
}, this.props)); | ||
}; | ||
@@ -316,0 +306,0 @@ |
{ | ||
"name": "react-sheet", | ||
"version": "0.0.27", | ||
"version": "0.0.28", | ||
"description": "Spreadsheet component for react", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3175815
38236