From 8fafe16a955339fd76f107080ed3c35aed838187 Mon Sep 17 00:00:00 2001 From: Darin Kelkhoff Date: Wed, 4 Dec 2024 16:11:08 -0600 Subject: [PATCH] CE-1955 handle currentSavedBulkLoadProfile being set, when going back to this screen --- src/qqq/components/processes/BulkLoadFileMappingForm.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/qqq/components/processes/BulkLoadFileMappingForm.tsx b/src/qqq/components/processes/BulkLoadFileMappingForm.tsx index a6a95ae..709f768 100644 --- a/src/qqq/components/processes/BulkLoadFileMappingForm.tsx +++ b/src/qqq/components/processes/BulkLoadFileMappingForm.tsx @@ -61,7 +61,8 @@ const BulkLoadFileMappingForm = forwardRef(({processValues, tableMetaData, metaD { const {setFieldValue} = useFormikContext(); - const [currentSavedBulkLoadProfile, setCurrentSavedBulkLoadProfile] = useState(null as QRecord); + const savedBulkLoadProfileRecordProcessValue = processValues.savedBulkLoadProfileRecord; + const [currentSavedBulkLoadProfile, setCurrentSavedBulkLoadProfile] = useState(savedBulkLoadProfileRecordProcessValue == null ? null : new QRecord(savedBulkLoadProfileRecordProcessValue)); const [wrappedCurrentSavedBulkLoadProfile] = useState(new Wrapper(currentSavedBulkLoadProfile)); const [fieldErrors, setFieldErrors] = useState({} as { [fieldName: string]: string });