Fix initial selectedRowKeys, close #1501

This commit is contained in:
afc163 2016-04-25 13:47:08 +08:00
parent 255c0b81d0
commit d7ee4bffa1
2 changed files with 2 additions and 2 deletions

View File

@ -49,7 +49,7 @@ const rowSelection = {
},
onSelectAll(selected, selectedRows, changeRows) {
console.log(selected, selectedRows, changeRows);
}
},
};
ReactDOM.render(<Table rowSelection={rowSelection} columns={columns} dataSource={data} />

View File

@ -31,7 +31,7 @@ let AntTable = React.createClass({
getInitialState() {
return {
//
selectedRowKeys: this.props.selectedRowKeys || [],
selectedRowKeys: (this.props.rowSelection || {}).selectedRowKeys || [],
filters: {},
selectionDirty: false,
sortColumn: '',