Skip to content

Commit

Permalink
fix: create course button inactive after using org drop-down (#1277)
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 8abcbe0 commit dc7bb9f
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 @@ -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]);

Expand Down

0 comments on commit dc7bb9f

Please sign in to comment.