Compare commits

...

1 Commits

Author SHA1 Message Date
afc163
f754c2f95b clear selected item when change dataSource, #793, bump 0.10.5 2016-01-04 15:04:59 +08:00
3 changed files with 7 additions and 10 deletions

View File

@@ -4,6 +4,10 @@
---
## 0.10.5 `2016-01-04`
- 修复 Table 更新 dataSource 后,选中项没有置空的问题。[#793](https://github.com/ant-design/ant-design/issues/793)
## 0.10.4 `2015-11-30`
- 将 media-match 加入默认的 polyfil 文件中。[5626974](https://github.com/ant-design/ant-design/commit/562697423b1139eb324c1dceb051c143f4870ed7)

View File

@@ -103,15 +103,8 @@ let AntTable = React.createClass({
// 外界只有 dataSource 的变化会触发新请求
if ('dataSource' in nextProps &&
nextProps.dataSource !== this.props.dataSource) {
let selectedRowKeys = this.state.selectedRowKeys;
// 把不在当前页的选中项去掉
if (this.isLocalDataSource()) {
let currentPageRowKeys = this.getLocalDataPaging(nextProps.dataSource);
selectedRowKeys = selectedRowKeys.filter((key) => {
return currentPageRowKeys.indexOf(key) >= 0;
});
}
this.setState({
selectedRowKeys: [],
selectionDirty: false,
dataSource: nextProps.dataSource,
loading: true

View File

@@ -1,7 +1,7 @@
{
"name": "antd",
"version": "0.10.4",
"stableVersion": "0.10.4",
"version": "0.10.5",
"stableVersion": "0.10.5",
"title": "Ant Design",
"description": "一个 UI 设计语言",
"homepage": "http://ant.design/",