From 79392bb129f69d8f3fca27c76e90fc95f1f5a47c Mon Sep 17 00:00:00 2001 From: dekzter Date: Wed, 30 Apr 2025 16:58:16 -0400 Subject: [PATCH] fixed channel form not updating some properties after saving --- frontend/src/components/forms/Channel.jsx | 1 + frontend/src/components/tables/ChannelsTable.jsx | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/frontend/src/components/forms/Channel.jsx b/frontend/src/components/forms/Channel.jsx index 33eca5ea..3253d67b 100644 --- a/frontend/src/components/forms/Channel.jsx +++ b/frontend/src/components/forms/Channel.jsx @@ -161,6 +161,7 @@ const Channel = ({ channel = null, isOpen, onClose }) => { console.error('Error saving channel:', error); } + formik.resetForm(); API.requeryChannels(); setSubmitting(false); setTvgFilter(''); diff --git a/frontend/src/components/tables/ChannelsTable.jsx b/frontend/src/components/tables/ChannelsTable.jsx index 7982817c..bdca0722 100644 --- a/frontend/src/components/tables/ChannelsTable.jsx +++ b/frontend/src/components/tables/ChannelsTable.jsx @@ -95,19 +95,19 @@ const ChannelRowActions = React.memo( }) => { const onEdit = useCallback(() => { editChannel(row.original); - }, []); + }, [row.original]); const onDelete = useCallback(() => { deleteChannel(row.original.id); - }, []); + }, [row.original]); const onPreview = useCallback(() => { handleWatchStream(row.original); - }, []); + }, [row.original]); const onRecord = useCallback(() => { createRecording(row.original); - }, []); + }, [row.original]); return (