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

can_set_page_size does not prevent custom page sizes #2430

Open
samuelhwilliams opened this issue May 17, 2024 · 0 comments
Open

can_set_page_size does not prevent custom page sizes #2430

samuelhwilliams opened this issue May 17, 2024 · 0 comments

Comments

@samuelhwilliams
Copy link

I'm not sure if this is just an incorrect assumption on my part, but my understanding was that can_set_page_size would prevent a user from customising the page size away from the default.

It looks like all it does it stop the page size dropdown rendering on the page, but that if you put page_size in the URL params directly you can still customise the page size.

I'm only playing with flask-admin for now, but I decided to toggle can_set_page_size = False on one of the views because I'm listing a number of related fields on the list display, which is causing the number of SQL queries to scale linearly with the number of results displayed. While it would be nice to fix that separately (if possible), it feels like the obvious behaviour of can_set_page_size is to actually stop the user from changing it.

Is the current behaviour intentional, or accidental?

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

1 participant