keywrod library sorting issue and fitlers inclusion, adn PLAN for refactor of whole page realted
This commit is contained in:
@@ -47,3 +47,19 @@ class CustomPageNumberPagination(PageNumberPagination):
|
||||
|
||||
return Response(response_data)
|
||||
|
||||
|
||||
class LargeTablePagination(CustomPageNumberPagination):
|
||||
"""
|
||||
Pagination class for large reference tables (e.g., SeedKeywords).
|
||||
|
||||
Default page size: 25
|
||||
Max page size: 500
|
||||
|
||||
Important: Server-side sorting/filtering is applied to ALL records first,
|
||||
then only the requested page is returned. This ensures:
|
||||
- Sorting by volume returns the 500 highest/lowest volume records globally
|
||||
- Filters apply to all records, not just the visible page
|
||||
- Pagination shows accurate total counts
|
||||
"""
|
||||
page_size = 25
|
||||
max_page_size = 500
|
||||
|
||||
Reference in New Issue
Block a user