{"action":"created","issue":{"url":"https://api.github.com/repos/ant-design/ant-design/issues/3859","repository_url":"https://api.github.com/repos/ant-design/ant-design","labels_url":"https://api.github.com/repos/ant-design/ant-design/issues/3859/labels{/name}","comments_url":"https://api.github.com/repos/ant-design/ant-design/issues/3859/comments","events_url":"https://api.github.com/repos/ant-design/ant-design/issues/3859/events","html_url":"https://github.com/ant-design/ant-design/issues/3859","id":189346349,"number":3859,"title":"antd 2.0+ 使用table组件的时候会提示This is a no-op. Please check the code for the Table component.","user":{"login":"favers","id":19677784,"avatar_url":"https://avatars.githubusercontent.com/u/19677784?v=3","gravatar_id":"","url":"https://api.github.com/users/favers","html_url":"https://github.com/favers","followers_url":"https://api.github.com/users/favers/followers","following_url":"https://api.github.com/users/favers/following{/other_user}","gists_url":"https://api.github.com/users/favers/gists{/gist_id}","starred_url":"https://api.github.com/users/favers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/favers/subscriptions","organizations_url":"https://api.github.com/users/favers/orgs","repos_url":"https://api.github.com/users/favers/repos","events_url":"https://api.github.com/users/favers/events{/privacy}","received_events_url":"https://api.github.com/users/favers/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-11-15T09:55:19Z","updated_at":"2016-11-16T00:54:57Z","closed_at":null,"body":"#### 发生问题的环境是：\r\n\r\n- antd 版本: 2.0.0以上\r\n- 操作系统及其版本:mac os 10.11.6\r\n- 浏览器及其版本:chrome 54.0.2840.71 (64-bit)\r\n- node版本: 7.0.0\r\n#### 您做了什么？请提供尽可能详细的重现步骤。\r\n\r\n使用table组件是多切换几次路由之后就会报一个Warning如图\r\n![image](https://cloud.githubusercontent.com/assets/19677784/20300828/dcfd4faa-ab5b-11e6-92c5-875579a82d93.png)\r\n\r\n```\r\nwarning.js?8a56:36 Warning: setState(...): Can only update a mounted or mounting component. This usually means you called setState() on an unmounted component. This is a no-op. Please check the code for the Table component.\r\n```\r\n\r\n错误定位在table.js\r\n```js\r\nthis.timer = setTimeout(function () {\r\n      _this6.setState({\r\n        fixedColumnsHeadRowsHeight: fixedColumnsHeadRowsHeight,\r\n        fixedColumnsBodyRowsHeight: fixedColumnsBodyRowsHeight\r\n      });\r\n    });\r\n```\r\n但是进去看了一下在componentWillUnmount的时候清除了定时器\r\n```\r\ncomponentWillUnmount: function componentWillUnmount() {\r\n    clearTimeout(this.timer);\r\n    if (this.resizeEvent) {\r\n      this.resizeEvent.remove();\r\n    }\r\n  }\r\n```\r\n\r\n#### 您期待的结果是:\r\n没有Warning的报错，暂时为止没发现有什么影响功能的地方，之前用的是2.0.1版本就有这个错误了，今天我升级成了2.4.2错误依然存在，我记得我之前用0.12.x的时候没有遇到这样的提示\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/ant-design/ant-design/issues/comments/260819855","html_url":"https://github.com/ant-design/ant-design/issues/3859#issuecomment-260819855","issue_url":"https://api.github.com/repos/ant-design/ant-design/issues/3859","id":260819855,"user":{"login":"favers","id":19677784,"avatar_url":"https://avatars.githubusercontent.com/u/19677784?v=3","gravatar_id":"","url":"https://api.github.com/users/favers","html_url":"https://github.com/favers","followers_url":"https://api.github.com/users/favers/followers","following_url":"https://api.github.com/users/favers/following{/other_user}","gists_url":"https://api.github.com/users/favers/gists{/gist_id}","starred_url":"https://api.github.com/users/favers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/favers/subscriptions","organizations_url":"https://api.github.com/users/favers/orgs","repos_url":"https://api.github.com/users/favers/repos","events_url":"https://api.github.com/users/favers/events{/privacy}","received_events_url":"https://api.github.com/users/favers/received_events","type":"User","site_admin":false},"created_at":"2016-11-16T00:54:57Z","updated_at":"2016-11-16T00:54:57Z","body":"我也很想提供演示地址，但是codepen并没有提供react-router，不能写router跳转，这边的问题单个表格不会报错，第一次进表格也不会报错，但是在多个表格之间多次切换，就会出现，我能确定我这边业务逻辑中没有写定时器之类的代码，而且错误指向是table.js，我就在浏览器上看了一下table.js 错误定位的地方是有清除过定时器的。"}}
{"actor":{"display_login":"favers"}}