Skip to content
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

Page number not updating when chaning page_parameter #76

Open
poltorres0999 opened this issue Dec 4, 2019 · 7 comments
Open

Page number not updating when chaning page_parameter #76

poltorres0999 opened this issue Dec 4, 2019 · 7 comments

Comments

@poltorres0999
Copy link

Hi,
I'm experimenting an issue when chaning the default page_parameter to have two pagination objects, since the page number is not chaging when selecting any of the pages of any of the two tables, the data is changing correctly and the query string is also updating it's values correctly.

Thank you,

Pol

@lixxu
Copy link
Owner

lixxu commented Dec 6, 2019

Sorry, I'm not quite sure what do you mean. Could you paste some codes for example?

@machines94
Copy link

at the moment I used two paginations on same page but after I added customizable page_parameter, page update number, doesn't work;
image

@lixxu
Copy link
Owner

lixxu commented Mar 28, 2020

two paginations? you mean two Pagination instances?

@kelj0
Copy link

kelj0 commented Sep 24, 2020

Hello @poltorres0999 I also had the same issue. I found this bug in the code and I fixed it. I also found one other bug which I also fixed.
Here is PR #85
@lixxu here's description
Lets say we have an app.py
image

So we want to specify a custom page and per page parameters ('p' and 'pp').
Frontend is
image

Expected behaviour is that we get page looking like this
image

which we get!

But the problem is when you click '2' or '3' or any other number in the pagination.info generated area this happens.
image
As you can see page refreshed, showed new results but pagination.info didn't change.
So I fixed that and I also found a new bug.
In the same example when you want to have different 'per_page' items (in this case 'pp') it works partly and it breaks pagination
image

Can you spot the problem? The number of pagination pages in the pagination.info didn't change. That means if we go to the last page, we will get no results
image
I fixed that issue also in the PR

@lixxu
Copy link
Owner

lixxu commented Sep 25, 2020

version 0.7.1 fixed the issue. Your PR can not fix it if page_parameter and per_page_parameter set.

@aleksandar
Copy link

The issue is still relevant in version 0.7.1. Have two tables and two Pagination objects, when change the page_parameter param for one. Pagination links don't show right page for a Pagination object which doesn't have default page param.

@kelj0
Copy link

kelj0 commented Oct 15, 2020

hey @aleksandar try to use my fix here https://github.com/lixxu/flask-paginate/pull/85/commits 😃
Lixxus fix doesn't work for me also.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants