-
Notifications
You must be signed in to change notification settings - Fork 430
Description
Is this feature requested before?
I don't see this requested before.
Is your feature request related to a problem? Please describe.
https://codesandbox.io/s/vigilant-tdd-owuxk
Load the sandbox, then select any page size over 10, and you'll see a pagination list that says "1", even though hidePageListOnlyOnePage: true
.
More info on what I see in the code
TLDR: The same classes and HTML tags do not get generated when it's standalone.
In the codesandbox source view, I see class react-bootstrap-table-page-btns-ul
on a ul
tag for PaginationListStandalone.
Looking in the main repo for a default, non-standalone pagination list, I see variable pageListClass
applied to a div
and it is modified by the hidePageListOnlyOnePage
flag:
react-bootstrap-table2/packages/react-bootstrap-table2-paginator/src/pagination.js
Lines 38 to 42 in 02cdbb5
const pageListClass = cs( | |
'react-bootstrap-table-pagination-list', | |
'col-md-6 col-xs-6 col-sm-6 col-lg-6', { | |
'react-bootstrap-table-pagination-list-hidden': (hidePageListOnlyOnePage && totalPages === 1) | |
}); |
Apparently, there is no such code that gets called in the standalone pagination list, thus hidePageListOnlyOnePage
does not work on PaginationListStandalone
.
Describe the solution you'd like
Have the same logic, classes and tags on the pagination list whether it's standalone or non-standalone, so that hidePageListOnlyOnePage
works in both cases.