Remove document on go back click on step 1

Invoke onBackStep on "go back" click and conditionally render go back label
This commit is contained in:
Prajwal Kulkarni
2024-02-06 00:40:53 +05:30
committed by GitHub
parent c6457e75e0
commit 37e9db6626

View File

@ -566,7 +566,9 @@ export const AddFieldsFormPartial = ({
onGoBackClick={() => {
previousStep();
remove();
documentFlow.onBackStep?.();
}}
goBackLabel={currentStep === 1 && typeof documentFlow.onBackStep === "function" ? "Remove" : undefined}
onGoNextClick={() => void onFormSubmit()}
/>
</DocumentFlowFormContainerFooter>