remove incorrect form error message in inv source

This commit is contained in:
Keith J. Grant 2022-05-02 10:32:10 -07:00
parent 68ee4311bf
commit e3aed9dad4

View File

@ -54,14 +54,16 @@ const SCMSubForm = ({ autoPopulateProject }) => {
const handleProjectUpdate = useCallback(
(value) => {
setFieldValue('source_project', value);
setFieldValue('source_path', '');
setFieldTouched('source_path', false);
setFieldTouched('source_project', true, false);
if (sourcePathField.value) {
setFieldValue('source_path', '');
setFieldTouched('source_path', false);
}
if (value) {
fetchSourcePath(value.id);
}
},
[fetchSourcePath, setFieldValue, setFieldTouched]
[fetchSourcePath, setFieldValue, setFieldTouched, sourcePathField.value]
);
const handleCredentialUpdate = useCallback(