Merge pull request #2005 from automatisch/AUT-1065

fix: in FlowStep wrap in Form component only controlled inputs
This commit is contained in:
Ali BARIN
2024-08-05 15:45:06 +02:00
committed by GitHub

View File

@@ -263,11 +263,6 @@ function FlowStep(props) {
<Content> <Content>
<List> <List>
<StepExecutionsProvider value={stepWithTestExecutionsData}> <StepExecutionsProvider value={stepWithTestExecutionsData}>
<Form
defaultValues={step}
onSubmit={handleSubmit}
resolver={stepValidationSchema}
>
<ChooseAppAndEventSubstep <ChooseAppAndEventSubstep
expanded={currentSubstep === 0} expanded={currentSubstep === 0}
substep={{ substep={{
@@ -298,7 +293,11 @@ function FlowStep(props) {
step={step} step={step}
/> />
)} )}
<Form
defaultValues={step}
onSubmit={handleSubmit}
resolver={stepValidationSchema}
>
{substep.key === 'testStep' && ( {substep.key === 'testStep' && (
<TestSubstep <TestSubstep
expanded={currentSubstep === index + 1} expanded={currentSubstep === index + 1}
@@ -317,7 +316,6 @@ function FlowStep(props) {
flowId={flowId} flowId={flowId}
/> />
)} )}
{substep.key && {substep.key &&
['chooseConnection', 'testStep'].includes( ['chooseConnection', 'testStep'].includes(
substep.key, substep.key,
@@ -332,9 +330,9 @@ function FlowStep(props) {
step={step} step={step}
/> />
)} )}
</Form>
</React.Fragment> </React.Fragment>
))} ))}
</Form>
</StepExecutionsProvider> </StepExecutionsProvider>
</List> </List>
</Content> </Content>