-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix hasPrevPage behaviour with limit > offset > 0 #144
Conversation
This reverts commit 82af9e9.
Thanks but again my question arises, why we are setting prev page as 1. Since its already loading 1st page. Waiting for your thoughts. |
The thing is since we set Which means we can go to the start of page 1 or continue to page 2 |
But, still we cannot go back to page 1, since its passing offset which loads the same page again. Moreover the frontend pagination can go haywire if current page is 1 and previous page is 1. Correct me if I'm wrong. |
Yes, that happened to me when you changed the behavior in 277d3f3 Please check src/index.js line 210 - 212. Your change was made because of #119 where the issue was to be on page 1 with an offset of 1 showed a previous page. He later told that he was not loosing the first element with offset 1 (which would mean offset does not work as expected): #133 (comment) In my opinion it can be a problem for someone new to this library which sets offset to 1 and not getting feedback that there is more data to be gatherd (prevPage). I think now it is up to you to decide which behavior you would like to support. |
Thanks @chdanielmueller for the prompt response. Let me go through this and will get back. |
Make sense. Package has been update with this change. |
Thanks @aravindnc for contributing your time and skill for the open source community 👍 |
continue on #133