提交 5e1f0960 编写于 作者: A afc163

Fix rowSelection.onChange selectedRows when specify rowKey

上级 a9076945
......@@ -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);
}
},
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册