mirror of
https://github.com/wahyd4/ant-design.git
synced 2026-08-22 19:28:47 +10:00
empty table should not have pagination
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user