fix table pagination false bug

This commit is contained in:
afc163 2015-07-21 16:47:52 +08:00
parent 411f19d765
commit 01a6c0f1e6

View File

@ -283,8 +283,15 @@ let AntTable = React.createClass({
});
} else {
let data = this.props.dataSource;
let pageSize = this.state.pagination.pageSize;
let current = this.state.pagination.current;
let current, pageSize;
//
if (this.state.pagination === false) {
pageSize = Number.POSITIVE_INFINITY;
current = 1;
} else {
pageSize = this.state.pagination.pageSize;
current = this.state.pagination.current;
}
//
if (this.state.sortOrder && this.state.sorter) {
data = data.sort(this.state.sorter);