mirror of
https://github.com/ant-design/ant-design.git
synced 2025-08-06 16:06:28 +08:00
Fix initial selectedRowKeys, close #1501
This commit is contained in:
parent
255c0b81d0
commit
d7ee4bffa1
@ -49,7 +49,7 @@ const rowSelection = {
|
||||
},
|
||||
onSelectAll(selected, selectedRows, changeRows) {
|
||||
console.log(selected, selectedRows, changeRows);
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
ReactDOM.render(<Table rowSelection={rowSelection} columns={columns} dataSource={data} />
|
||||
|
@ -31,7 +31,7 @@ let AntTable = React.createClass({
|
||||
getInitialState() {
|
||||
return {
|
||||
// 减少状态
|
||||
selectedRowKeys: this.props.selectedRowKeys || [],
|
||||
selectedRowKeys: (this.props.rowSelection || {}).selectedRowKeys || [],
|
||||
filters: {},
|
||||
selectionDirty: false,
|
||||
sortColumn: '',
|
||||
|
Loading…
Reference in New Issue
Block a user