From 22ecee4f8514a08845274c0ddfede4bbda5b3f18 Mon Sep 17 00:00:00 2001 From: SergeantPanda Date: Fri, 23 Jan 2026 17:56:21 -0600 Subject: [PATCH] Bug Fix: Fix No EPG filter on channels table. --- frontend/src/components/tables/ChannelsTable.jsx | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/frontend/src/components/tables/ChannelsTable.jsx b/frontend/src/components/tables/ChannelsTable.jsx index 9106fdcc..f9780139 100644 --- a/frontend/src/components/tables/ChannelsTable.jsx +++ b/frontend/src/components/tables/ChannelsTable.jsx @@ -401,6 +401,12 @@ const ChannelsTable = ({ onReady }) => { if (hasUnlinkedChannels) { epgOptions.unshift('No EPG'); } + // Map for MultiSelect: value 'null' for 'No EPG', label for display + const epgSelectOptions = epgOptions.map((opt) => + opt === 'No EPG' + ? { value: 'null', label: 'No EPG' } + : { value: opt, label: opt } + ); const debouncedFilters = useDebounce(filters, 500, () => { setPagination({ ...pagination, @@ -515,9 +521,9 @@ const ChannelsTable = ({ onReady }) => { }; const handleEPGChange = (value) => { - // Convert "No EPG" to null for natural filtering + // Map 'null' (string) back to 'null' for backend, but keep UI label correct const processedValue = value - ? value.map((v) => (v === 'No EPG' ? null : v)) + ? value.map((v) => (v === 'null' ? 'null' : v)) : ''; setFilters((prev) => ({ ...prev, @@ -1001,7 +1007,7 @@ const ChannelsTable = ({ onReady }) => {