From f7eed7d5ac86fe9d3cd04628e2419dc41c19bc8b Mon Sep 17 00:00:00 2001 From: Anton Izmailov Date: Wed, 17 Aug 2016 00:57:06 +0300 Subject: [PATCH 1/2] Update paginator.jsx Adding case like: 1,2,3...104 page --- src/reactable/paginator.jsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/reactable/paginator.jsx b/src/reactable/paginator.jsx index 62f1e6dd..b5a72d3c 100644 --- a/src/reactable/paginator.jsx +++ b/src/reactable/paginator.jsx @@ -91,6 +91,11 @@ export class Paginator extends React.Component { if((numPages - currentPage) > upperHalf) { pageButtons.splice(pageButtonLimit, pageButtons.length - pageButtonLimit); } + + if(numPages > 10 && (numPage - 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 ( From bea36e0ac11911373646c37a6a804ec4ae3fd2c4 Mon Sep 17 00:00:00 2001 From: Anton Izmailov Date: Wed, 17 Aug 2016 01:46:36 +0300 Subject: [PATCH 2/2] Update paginator.jsx --- src/reactable/paginator.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/reactable/paginator.jsx b/src/reactable/paginator.jsx index b5a72d3c..9b3c67ac 100644 --- a/src/reactable/paginator.jsx +++ b/src/reactable/paginator.jsx @@ -92,7 +92,7 @@ export class Paginator extends React.Component { pageButtons.splice(pageButtonLimit, pageButtons.length - pageButtonLimit); } - if(numPages > 10 && (numPage - currentPage) > lowerHalf) { //For showing like: 1,2,3...104 pages, can be incorrect, please fix it if it wrong + 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)) }