diff --git a/src/components/ImportForm/ReviewSection/RuntimeSelector.tsx b/src/components/ImportForm/ReviewSection/RuntimeSelector.tsx index 722d13185..457f4a801 100644 --- a/src/components/ImportForm/ReviewSection/RuntimeSelector.tsx +++ b/src/components/ImportForm/ReviewSection/RuntimeSelector.tsx @@ -191,9 +191,11 @@ export const RuntimeSelector: React.FC = ({ detectedCompon setFieldError(`${fieldPrefix}.runtime`, detectionError); } else if (detectionLoaded && detectedComponents) { setDetecting(false); + setFieldValue('isDetected', true); + setFieldValue('detectionFailed', false); // To avoid formik validating on old values due to a formik bug - https://github.com/jaredpalmer/formik/issues/2083 - setTimeout(() => setFieldValue('isDetected', true)); - setTimeout(() => setFieldValue('detectionFailed', false)); + setTimeout(() => setFieldTouched('isDetected', true)); + setTimeout(() => setFieldTouched('detectionFailed', true)); const componentValues = transformComponentValues( detectedComponents, originalComponentRef.current, @@ -210,6 +212,7 @@ export const RuntimeSelector: React.FC = ({ detectedCompon detectionLoaded, fieldPrefix, setFieldError, + setFieldTouched, setFieldValue, sourceUrl, defaultResourceLimits,