Skip to content

Commit

Permalink
fix:fix exam result select (#694)
Browse files Browse the repository at this point in the history
  • Loading branch information
SilverD3 authored Nov 13, 2024
1 parent 7a5c443 commit 77c7979
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/components/accessories/laboratory/examForm/ExamForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,9 @@ const ExamForm: FC<ExamProps> = ({
if (initialValues["exam"] !== "") {
setCurrentExamCode(initialValues["exam"]);
}
}, [initialValues]);

// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);

useEffect(() => {
if (currentExamCode) {
Expand Down Expand Up @@ -261,6 +263,7 @@ const ExamForm: FC<ExamProps> = ({
setFieldValue(fieldName, value);
if (fieldName === "exam") {
setCurrentExamCode(value);
setFieldValue("result", "");
}

// Clear rowsData variable for exam status validation
Expand Down

0 comments on commit 77c7979

Please sign in to comment.