Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Make hidePageListOnlyOnePage work on PaginationListStandalone #1279

Closed
Assignees
Milestone
@kevinashworth

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:

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.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    AltStyle によって変換されたページ (->オリジナル) /