From 04ad614282f8a0246fbf371faa43343ca9ebeda0 Mon Sep 17 00:00:00 2001 From: Dima Alipov Date: Thu, 12 Sep 2024 16:57:05 +0300 Subject: [PATCH] fix: create course button inactive after using org drop-down --- src/generic/create-or-rerun-course/hooks.jsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/generic/create-or-rerun-course/hooks.jsx b/src/generic/create-or-rerun-course/hooks.jsx index cc30895c88..4bfecb08dd 100644 --- a/src/generic/create-or-rerun-course/hooks.jsx +++ b/src/generic/create-or-rerun-course/hooks.jsx @@ -82,7 +82,11 @@ const useCreateOrRerunCourse = (initialValues) => { }, []); useEffect(() => { - setFormFilled(Object.values(values).every((i) => i)); + setFormFilled( + Object.entries(values) + ?.filter(([key]) => key !== 'undefined') + .every(([, value]) => value), + ); dispatch(updatePostErrors({})); }, [values]);