flask-paginate
flask-paginate copied to clipboard
Page number not updating when chaning page_parameter
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
Sorry, I'm not quite sure what do you mean. Could you paste some codes for example?
at the moment I used two paginations on same page but after I added customizable page_parameter, page update number, doesn't work;
two paginations
? you mean two Pagination instances
?
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 https://github.com/lixxu/flask-paginate/pull/85
@lixxu here's description
Lets say we have an app.py
So we want to specify a custom page and per page parameters ('p' and 'pp').
Frontend is
Expected behaviour is that we get page looking like this
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.
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
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
I fixed that issue also in the PR
version 0.7.1
fixed the issue. Your PR can not fix it if page_parameter
and per_page_parameter
set.
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.
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.