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:
@@ -566,7 +566,9 @@ export const AddFieldsFormPartial = ({
|
|||||||
onGoBackClick={() => {
|
onGoBackClick={() => {
|
||||||
previousStep();
|
previousStep();
|
||||||
remove();
|
remove();
|
||||||
|
documentFlow.onBackStep?.();
|
||||||
}}
|
}}
|
||||||
|
goBackLabel={currentStep === 1 && typeof documentFlow.onBackStep === "function" ? "Remove" : undefined}
|
||||||
onGoNextClick={() => void onFormSubmit()}
|
onGoNextClick={() => void onFormSubmit()}
|
||||||
/>
|
/>
|
||||||
</DocumentFlowFormContainerFooter>
|
</DocumentFlowFormContainerFooter>
|
||||||
|
|||||||
Reference in New Issue
Block a user