fix(keydown): keydown

keydown
This commit is contained in:
jonyshi 2018-12-29 16:18:27 +08:00
parent 44ed1086ee
commit 5de98298ca
5 changed files with 9 additions and 12 deletions

BIN
build.zip Normal file

Binary file not shown.

View File

@ -246,10 +246,6 @@ var Table = function (_Component) {
_utils.EventUtil.addHandler(document, 'keydown', this.onKeyDown);
};
Table.prototype.componentWillUnmount = function componentWillUnmount() {
_utils.EventUtil.removeHandler(document, 'keydown', this.onKeyDown);
};
Table.prototype.componentDidMount = function componentDidMount() {
setTimeout(this.resetScrollY, 300);
//含有纵向滚动条
@ -315,6 +311,7 @@ var Table = function (_Component) {
};
Table.prototype.componentWillUnmount = function componentWillUnmount() {
_utils.EventUtil.removeHandler(document, 'keydown', this.onKeyDown);
if (this.resizeEvent) {
this.resizeEvent.remove();
}
@ -1198,7 +1195,7 @@ var Table = function (_Component) {
'div',
{ className: className, style: props.style, ref: function ref(el) {
return _this6.contentTable = el;
}, tabIndex: props.tabIndex ? props.tabIndex : '0' },
}, onKeyDown: this.onKeyDown, tabIndex: props.tabIndex ? props.tabIndex : '0' },
this.getTitle(),
_react2["default"].createElement(
'div',

10
dist/demo.js vendored
View File

@ -11027,10 +11027,6 @@
_utils.EventUtil.addHandler(document, 'keydown', this.onKeyDown);
};
Table.prototype.componentWillUnmount = function componentWillUnmount() {
_utils.EventUtil.removeHandler(document, 'keydown', this.onKeyDown);
};
Table.prototype.componentDidMount = function componentDidMount() {
setTimeout(this.resetScrollY, 300);
//含有纵向滚动条
@ -11096,6 +11092,10 @@
};
Table.prototype.componentWillUnmount = function componentWillUnmount() {
debugger;
console.log(' -----componentWillUnmount-------- ');
// EventUtil.removeHandler(document,'keydown',this.onKeyDown);
if (this.resizeEvent) {
this.resizeEvent.remove();
}
@ -11979,7 +11979,7 @@
'div',
{ className: className, style: props.style, ref: function ref(el) {
return _this6.contentTable = el;
}, tabIndex: props.tabIndex ? props.tabIndex : '0' },
}, onKeyDown: this.onKeyDown, tabIndex: props.tabIndex ? props.tabIndex : '0' },
this.getTitle(),
_react2['default'].createElement(
'div',

2
dist/demo.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
{
"name": "bee-table",
"version": "1.6.21",
"version": "1.6.22",
"description": "Table ui component for react",
"keywords": [
"react",