Add "num_pages" & "page_size" as part of the Paginator #8734
Unanswered
VaZark
asked this question in
Ideas & Suggestions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Context :
Most tables that use a paginator allow users to scroll through or go directly to a page number. However, DRF currently does not return neither page size nor the total number of pages in a paginated response.
While it is fairly easy enough to calculate the number of pages with
Math.ceil(total/page_size)
, being able to view it by default in the paginated response would just make it easier for ergonomics (a little less logic to handle) on the frontend.It is easy enough to add with the,
Beta Was this translation helpful? Give feedback.
All reactions