fix table select all

This commit is contained in:
afc163 2016-01-15 17:43:37 +08:00
parent 4bd34c4500
commit 341ad18eb6
2 changed files with 7 additions and 3 deletions

View File

@ -342,9 +342,13 @@ let AntTable = React.createClass({
checked = this.state.selectionDirty
? data.every((item, i) =>
this.state.selectedRowKeys.indexOf(this.getRecordKey(item, i)) >= 0)
: data.every((item) =>
: (
data.every((item, i) =>
this.state.selectedRowKeys.indexOf(this.getRecordKey(item, i)) >= 0) ||
data.every((item) =>
this.props.rowSelection.getCheckboxProps &&
this.props.rowSelection.getCheckboxProps(item).defaultChecked);
this.props.rowSelection.getCheckboxProps(item).defaultChecked)
);
}
let selectionColumn;
if (this.props.rowSelection.type === 'radio') {

View File

@ -1,6 +1,6 @@
{
"name": "antd",
"version": "0.12.0-beta.12",
"version": "0.12.0-beta.13",
"title": "Ant Design",
"description": "一个 UI 设计语言",
"homepage": "http://ant.design/",