mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-24 11:10:01 +08:00
Fix rowSelection.onChange selectedRows when specify rowKey
This commit is contained in:
parent
a9076945a9
commit
5e1f0960a2
@ -111,7 +111,9 @@ let AntTable = React.createClass({
|
||||
}
|
||||
if (this.props.rowSelection && this.props.rowSelection.onChange) {
|
||||
const data = this.getCurrentPageData();
|
||||
const selectedRows = data.filter(row => selectedRowKeys.indexOf(row.key) >= 0);
|
||||
const selectedRows = data.filter(
|
||||
(row, i) => selectedRowKeys.indexOf(this.getRecordKey(row, i)) >= 0
|
||||
);
|
||||
this.props.rowSelection.onChange(selectedRowKeys, selectedRows);
|
||||
}
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user