Skip to content

Commit 4739d43

Browse files
committed
1 parent ddf7fc9 commit 4739d43

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/BootstrapTable.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -705,6 +705,8 @@ class BootstrapTable extends Component {
705705
dataSize = this.store.getDataNum();
706706
}
707707
const { options } = this.props;
708+
if (Math.ceil(dataSize / this.state.sizePerPage) <= 1 &&
709+
this.props.ignoreSinglePage) return null;
708710
return (
709711
<div className='react-bs-table-pagination'>
710712
<PaginationList
@@ -964,7 +966,8 @@ BootstrapTable.propTypes = {
964966
dataTotalSize: PropTypes.number
965967
}),
966968
exportCSV: PropTypes.bool,
967-
csvFileName: PropTypes.string
969+
csvFileName: PropTypes.string,
970+
ignoreSinglePage: PropTypes.bool
968971
};
969972
BootstrapTable.defaultProps = {
970973
height: '100%',
@@ -1046,7 +1049,8 @@ BootstrapTable.defaultProps = {
10461049
dataTotalSize: 0
10471050
},
10481051
exportCSV: false,
1049-
csvFileName: 'spreadsheet.csv'
1052+
csvFileName: 'spreadsheet.csv',
1053+
ignoreSinglePage: false
10501054
};
10511055

10521056
export default BootstrapTable;

0 commit comments

Comments
 (0)