Do not empty selection when change dataSource now

eh... empty behavious will trigger a infinite loop when sapecify
immutable dataSource

You need to empty manully when change data or current page
This commit is contained in:
afc163 2016-01-15 16:07:59 +08:00
parent 06abba27a9
commit 3ed9ce3cb5

View File

@ -93,7 +93,6 @@ let AntTable = React.createClass({
this.setState({ this.setState({
selectionDirty: false, selectionDirty: false,
}); });
this.setSelectedRowKeys([]);
} }
if (nextProps.rowSelection && if (nextProps.rowSelection &&
'selectedRowKeys' in nextProps.rowSelection) { 'selectedRowKeys' in nextProps.rowSelection) {
@ -270,7 +269,6 @@ let AntTable = React.createClass({
pagination pagination
}; };
this.setState(newState); this.setState(newState);
this.setSelectedRowKeys([]);
this.props.onChange.apply(this, this.prepareParamsArguments( this.props.onChange.apply(this, this.prepareParamsArguments(
objectAssign({}, this.state, newState) objectAssign({}, this.state, newState)
)); ));