Fix rowSelection null, close #2127

This commit is contained in:
afc163 2016-06-21 19:35:29 +08:00
parent 00e7eabd4e
commit 7d06517846

View File

@ -140,7 +140,10 @@ export default class Table extends React.Component {
this.setState({
selectedRowKeys: nextProps.rowSelection.selectedRowKeys || [],
});
if (nextProps.rowSelection.getCheckboxProps !== this.props.rowSelection.getCheckboxProps) {
const { rowSelection } = this.props;
if (rowSelection && (
nextProps.rowSelection.getCheckboxProps !== rowSelection.getCheckboxProps
)) {
this.CheckboxPropsCache = {};
}
}