Previous button stays disabled, next always goes to the second page
See original GitHub issueI get this strange behavior with this is the code: I cannot click on the previous button because it stays disabled, even when going to page 2 or 3 Next always goes back to the second page Clicking on the first page doesn’t do anything (it remains to have the class “active” even when i’m on another page)
Similar behavior was found here, but not resolved: https://github.com/AdeleD/react-paginate/issues/100
<ReactPaginate pageCount={3}
marginPagesDisplayed={2}
pageRangeDisplayed={2}
previousLabel={"previous"}
nextLabel={"next"}
breakLabel={<a href="">...</a>}
breakClassName={"break-me"}
disableInitialCallback={true}
onPageChange={this.handlePageClick.bind(this)}
containerClassName={"pagination"}
subContainerClassName={"pages pagination"}
activeClassName={"active"} />
Issue Analytics
- State:
- Created 7 years ago
- Comments:10 (2 by maintainers)
Top Results From Across the Web
javascript - Button remains disabled upon pressing back
In the example, when the button is disabled and the page I'd directs to another location, firefox does keep the button disabled whereas...
Read more >FIX: Back Button Not Working in Web Browser?
Another way to deal with the issue is to click the Back button multiple times rapidly. That helps prevent any previous redirects from...
Read more >Frustrating Design Patterns: Disabled Buttons
Making Disabled Buttons More Inclusive # Here are a couple of useful strategies that Sandrina has suggested: change the cursor on a disabled ......
Read more >Remove "Next" button from last page of module.
My guess is that we're stuck with a "Next" on every single page, regardless of whether it is at the end of a...
Read more >How to disable or enable buttons using Javascript and jQuery
5. Just like in javascript, if the text field is empty the button remains disabled, else it gets enabled. 6. Here the .prop ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is the complete class I use. Note that it works fine by clicking on “the number 2 to go to page 2” because then the products change and works as intented. But the previous button remains disabled, and “the number 1 remains active”…
Ok, solved. Use
forcePage