@@ -75,7 +75,8 @@ class PaginationList extends Component {
7575 sizePerPageList,
7676 paginationShowsTotal,
7777 pageStartIndex,
78- paginationPanel
78+ paginationPanel,
79+ hidePageListOnlyOnePage
7980 } = this . props ;
8081 this . totalPages = Math . ceil ( dataSize / sizePerPage ) ;
8182 this . lastPage = this . props . pageStartIndex + this . totalPages - 1 ;
@@ -110,6 +111,7 @@ class PaginationList extends Component {
110111 }
111112 } ) ;
112113
114+ const hidePageList = hidePageListOnlyOnePage && this . totalPages === 1 ? 'none' : 'block' ;
113115 return (
114116 < div className = 'row' style = { { marginTop : 15 } } >
115117 {
@@ -118,7 +120,8 @@ class PaginationList extends Component {
118120 < div className = 'col-md-6 col-xs-6 col-sm-6 col-lg-6' >
119121 { total } { sizePerPageList . length > 1 ? dropdown : null }
120122 </ div >
121- < div className = 'col-md-6 col-xs-6 col-sm-6 col-lg-6' >
123+ < div style = { { display : hidePageList } }
124+ className = 'col-md-6 col-xs-6 col-sm-6 col-lg-6' >
122125 { pageBtns }
123126 </ div >
124127 </ div >
@@ -298,7 +301,8 @@ PaginationList.propTypes = {
298301 prePageTitle : PropTypes . string ,
299302 nextPageTitle : PropTypes . string ,
300303 firstPageTitle : PropTypes . string ,
301- lastPageTitle : PropTypes . string
304+ lastPageTitle : PropTypes . string ,
305+ hidePageListOnlyOnePage : PropTypes . bool
302306} ;
303307
304308PaginationList . defaultProps = {
0 commit comments