From 2df377b7f58809ea1b2ac1f503fd9a00ef3a5eab Mon Sep 17 00:00:00 2001 From: SergeantPanda Date: Fri, 18 Jul 2025 21:32:41 -0500 Subject: [PATCH] Fixes channel table not pulling from local storage for page size. --- apps/channels/api_views.py | 4 ++-- frontend/src/store/channelsTable.jsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/channels/api_views.py b/apps/channels/api_views.py index d89ca238..0973dce0 100644 --- a/apps/channels/api_views.py +++ b/apps/channels/api_views.py @@ -69,7 +69,7 @@ class OrInFilter(django_filters.Filter): class StreamPagination(PageNumberPagination): - page_size = 25 # Default page size + page_size = 50 # Default page size to match frontend default page_size_query_param = "page_size" # Allow clients to specify page size max_page_size = 10000 # Prevent excessive page sizes @@ -279,7 +279,7 @@ class ChannelGroupViewSet(viewsets.ModelViewSet): # 3) Channel Management (CRUD) # ───────────────────────────────────────────────────────── class ChannelPagination(PageNumberPagination): - page_size = 25 # Default page size + page_size = 50 # Default page size to match frontend default page_size_query_param = "page_size" # Allow clients to specify page size max_page_size = 10000 # Prevent excessive page sizes diff --git a/frontend/src/store/channelsTable.jsx b/frontend/src/store/channelsTable.jsx index 592e5c86..cdfb71c6 100644 --- a/frontend/src/store/channelsTable.jsx +++ b/frontend/src/store/channelsTable.jsx @@ -10,7 +10,7 @@ const useChannelsTableStore = create((set, get) => ({ sorting: [{ id: 'channel_number', desc: false }], pagination: { pageIndex: 0, - pageSize: 50, + pageSize: JSON.parse(localStorage.getItem('channel-table-prefs'))?.pageSize || 50, }, selectedChannelIds: [], allQueryIds: [],