修复本地模式下 pagination 为 false 时数据无法显示的问题

This commit is contained in:
afc163 2015-07-27 15:38:06 +08:00
parent 70d2a21755
commit 1954586665

View File

@ -218,7 +218,7 @@ export default React.createClass({
},
renderPagination() {
//
if (this.state.pagination === false) {
if (this.props.pagination === false) {
return '';
}
let classString = 'ant-table-pagination';
@ -248,7 +248,7 @@ export default React.createClass({
}
return [pagination, filters, sorter];
},
fetch: function() {
fetch() {
if (this.mode === 'remote') {
// remote 使 this.dataSource
let dataSource = this.dataSource;
@ -283,8 +283,8 @@ export default React.createClass({
let data = this.props.dataSource;
let current, pageSize;
//
if (this.state.pagination === false) {
pageSize = Number.POSITIVE_INFINITY;
if (this.props.pagination === false) {
pageSize = Number.MAX_VALUE;
current = 1;
} else {
pageSize = this.state.pagination.pageSize;