Skip to content

Commit

Permalink
fix: create course button inactive after using org drop-down (#1276)
Browse files Browse the repository at this point in the history
Co-authored-by: Dima Alipov <[email protected]>
  • Loading branch information
DmytroAlipov and Dima Alipov authored Sep 12, 2024
1 parent 9bbbf61 commit 5672831
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/generic/create-or-rerun-course/hooks.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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]);

Expand Down

0 comments on commit 5672831

Please sign in to comment.