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

Fix page number issue when changing page size #782

Merged
merged 6 commits into from
Jul 12, 2024

Conversation

numberbee7070
Copy link
Contributor

fixes #781

New page is calculated as ((currentPage - 1) * pageSize // newPageSize) + 1 such that user will be taken to new page which has the first entry of currentPage visible.

sqladmin/pagination.py Outdated Show resolved Hide resolved
tests/test_pagination.py Outdated Show resolved Hide resolved
sqladmin/templates/sqladmin/list.html Outdated Show resolved Hide resolved
Copy link
Owner

@aminalaee aminalaee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR 👍

@aminalaee aminalaee merged commit 5174973 into aminalaee:main Jul 12, 2024
7 checks passed
@aminalaee aminalaee mentioned this pull request Sep 6, 2024
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

Successfully merging this pull request may close these issues.

Page size selection at bottom sometimes takes the user to non existing page
2 participants