question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

forcePage prop is not respected

See original GitHub issue

Greetings good people maintaining this pagination lib.

From your docs on forcePage

To override selected page with parent prop. Use this if you want to control the page from your app state.

But this is not true. If forcePage={5} , for example, and you click on on page 1, page 1 becomes active instead of 5. I see from your tests

  • it('(observation) is not totally controlled when forcePage is provided', () => {
  • it('(observation) is not totally controlled when forcePage is provided, even when it is 0', () => {

that this is somewhat desirable, but not sure why?

If component is controlled, it should stay that way, there’s no point having forcePage if it won’t control the component, it behaves the same as initialPage

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:11

github_iconTop GitHub Comments

1reaction
fila90commented, Feb 8, 2022

Great!! One more question, can you bring back support for IE in v9? Somehow it got lost in v8 but we need to support IE 11 in our app, since it’s not a super complex lib, it would be nice if we could use the latest version 😄

1reaction
MonsieurVcommented, Feb 8, 2022

Yes, for the PR, fork, then from your repo branch you can submit a PR.

I let the ticket open just to remind me to finalize the v9 release, but yes indeed, this won’t be an issue anymore when we have a truly fully-controlling page prop.

Read more comments on GitHub >

github_iconTop Results From Across the Web

react-paginate - Bountysource
forcePage prop is not respected $ 0 · it('(observation) is not totally controlled when forcePage is provided', () => { · it('(observation) is...
Read more >
React Paginate Second Instance on same page does not re ...
You have to use forcePage prop to sync the both paginations. So once a page is changed, in onPageChange callback you update the...
Read more >
Solved Centripetal Force Page 1 of 2 1Centripetal Force
What supplies the necessary centripetal force for (a) a satellite in orbit around the earth, (b) the mass in uniform circular motion in...
Read more >
MARVEL Strike Force x Marvel Midnight Suns | 2K
If you do not accept optional cookies, your experience may be affected. If you want to know more, please read the Cookie Policy....
Read more >
Formatting Properties - W3C
Properties that control the alignment of inline-areas with respect to each other, ... This property is not inherited, but all subsidiary nodes of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found