Skip to content

Commit

Permalink
Merge pull request #336 from CBIIT/2.1.0/CRDCDH-1016
Browse files Browse the repository at this point in the history
CRDCDH-1016 Validation Controls memo missing dependency
  • Loading branch information
Alejandro-Vega authored Apr 9, 2024
2 parents dfa7204 + 2945abb commit ac60ba7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/DataSubmissions/ValidationControls.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ const ValidationControls: FC<Props> = ({ dataSubmission, onValidate }: Props) =>
}

return dataSubmission?.metadataValidationStatus !== null;
}, [user?.role, dataSubmission?.metadataValidationStatus]);
}, [user?.role, dataSubmission?.metadataValidationStatus, dataSubmission?.status]);

const canValidateFiles: boolean = useMemo(() => {
if (!user?.role || ValidateRoles.includes(user?.role) === false) {
Expand All @@ -129,7 +129,7 @@ const ValidationControls: FC<Props> = ({ dataSubmission, onValidate }: Props) =>
}

return dataSubmission?.fileValidationStatus !== null;
}, [user?.role, dataSubmission?.fileValidationStatus]);
}, [user?.role, dataSubmission?.fileValidationStatus, dataSubmission?.status]);

const [validateSubmission] = useMutation<ValidateSubmissionResp>(VALIDATE_SUBMISSION, {
context: { clientName: 'backend' },
Expand Down

0 comments on commit ac60ba7

Please sign in to comment.