Comments (3)
hi @garettg
the problem is here
let firstPage = Math.max(1, currentPage - Math.floor(pageRangeDisplayed / 2));
let lastPage = Math.min(totalPages, currentPage + Math.floor(pageRangeDisplayed / 2));
You can find this code here (http://deoxxa.github.io/paginator/docs/). This is used in this paginator's implementation
... and then look at the code of this paginator, which you are using and consider that paginationInfo.first_page==1 and paginationInfo.last_page ==1
. this code is in src/components/Pagination.js
if (paginationInfo.first_page !== paginationInfo.last_page) {
for(let i = paginationInfo.first_page; i <= paginationInfo.last_page; i++) {
pages.push(
<Page
isActive={i === activePage}
key={i}
pageNumber={i}
pageText={i + ""}
onClick={onChange}
activeClass={activeClass}
/>
);
}
}
This means that if you use pageRange with equality 1 no page is pushed into the pages array
from react-js-pagination.
FirstPage link is always disabled if I set pageRangeDisplayed={1}. Is there any workaround for this?
from react-js-pagination.
fixed at 3.0.0 version
from react-js-pagination.
Related Issues (20)
- Multiple React Instances HOT 1
- Multiple React Instances HOT 4
- How can i show the last page number?
- How can i show the last page number?
- How can i show the last page number?
- Npm install Fails HOT 1
- Don't Receive pageNumber as arg by hooks HOT 1
- How can I add simple href url? HOT 1
- No Way to Track Previous, Next, First, Last Page Events
- 2 instances of react detected because of react-js-pagination
- Cannot set both active and inactive classes
- Wrong URL in the Description
- Num of pages was incorrect HOT 1
- Is this package still maintained? HOT 2
- `pageRangeDisplayed` prop not working
- 2 high severity vulnerabilities HOT 2
- Is this project still maintained?
- Navigation does not work
- Change activePage but Paga not change
- Release 3.0.4? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-js-pagination.