diff --git a/src/Table.js b/src/Table.js index 6614c8a..32f0fcb 100644 --- a/src/Table.js +++ b/src/Table.js @@ -141,10 +141,6 @@ class Table extends Component { EventUtil.addHandler(document,'keydown',this.onKeyDown); } - componentWillUnmount() { - EventUtil.removeHandler(document,'keydown',this.onKeyDown); - } - componentDidMount() { setTimeout(this.resetScrollY, 300); //含有纵向滚动条 @@ -216,6 +212,7 @@ class Table extends Component { } componentWillUnmount() { + EventUtil.removeHandler(document,'keydown',this.onKeyDown); if (this.resizeEvent) { this.resizeEvent.remove(); } @@ -1066,7 +1063,7 @@ class Table extends Component { } return ( -