mirror of
https://github.com/ant-design/ant-design.git
synced 2025-01-18 06:03:38 +08:00
修复本地模式下 pagination 为 false 时数据无法显示的问题
This commit is contained in:
parent
70d2a21755
commit
1954586665
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user