Skip to content
This repository was archived by the owner on Jan 15, 2022. It is now read-only.

Update paginator.jsx #310

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/reactable/paginator.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,11 @@ export class Paginator extends React.Component {
if((numPages - currentPage) > upperHalf) {
pageButtons.splice(pageButtonLimit, pageButtons.length - pageButtonLimit);
}

if(numPages > 10 && (numPages - currentPage) > lowerHalf) { //For showing like: 1,2,3...104 pages, can be incorrect, please fix it if it wrong
let className = "reactable-page-button";
pageButtons.push(' ... ' + this.renderPageButton(className, numPages))
}

return (
<tbody className="reactable-pagination">
Expand Down