From f3cd5a68ee23d7edeb26f90d1f00d571aded2a77 Mon Sep 17 00:00:00 2001 From: Dima Alipov Date: Thu, 12 Sep 2024 16:04:21 +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 2c0a8d0b71..6807afdcf4 100644 --- a/src/generic/create-or-rerun-course/hooks.jsx +++ b/src/generic/create-or-rerun-course/hooks.jsx @@ -84,7 +84,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]);