empty table should not have pagination

pull/210/merge
afc163 10 years ago
parent 4c54644116
commit e45fbaad7f

@ -313,15 +313,15 @@ var AntTable = React.createClass({
if (this.props.size === 'small') {
classString += ' mini';
}
let total;
if (this.isLocalDataSource()) {
let total = this.state.pagination.total;
if (!total && this.isLocalDataSource()) {
total = this.getLocalData().length;
}
return <Pagination className={classString}
return (total > 0) ? <Pagination className={classString}
onChange={this.handlePageChange}
total={total}
pageSize={10}
{...this.state.pagination} />;
{...this.state.pagination} /> : null;
},
prepareParamsArguments(state) {

@ -184,6 +184,7 @@
font-size: 12px;
color: #999;
border-bottom: 1px solid #E9E9E9;
margin-bottom: 16px;
.anticon {
margin-right: 4px;
position: relative;

Loading…
Cancel
Save