Merge pull request #2005 from automatisch/AUT-1065
fix: in FlowStep wrap in Form component only controlled inputs
This commit is contained in:
@@ -263,42 +263,41 @@ function FlowStep(props) {
|
|||||||
<Content>
|
<Content>
|
||||||
<List>
|
<List>
|
||||||
<StepExecutionsProvider value={stepWithTestExecutionsData}>
|
<StepExecutionsProvider value={stepWithTestExecutionsData}>
|
||||||
<Form
|
<ChooseAppAndEventSubstep
|
||||||
defaultValues={step}
|
expanded={currentSubstep === 0}
|
||||||
onSubmit={handleSubmit}
|
substep={{
|
||||||
resolver={stepValidationSchema}
|
key: 'chooAppAndEvent',
|
||||||
>
|
name: 'Choose app & event',
|
||||||
<ChooseAppAndEventSubstep
|
arguments: [],
|
||||||
expanded={currentSubstep === 0}
|
}}
|
||||||
substep={{
|
onExpand={() => toggleSubstep(0)}
|
||||||
key: 'chooAppAndEvent',
|
onCollapse={() => toggleSubstep(0)}
|
||||||
name: 'Choose app & event',
|
onSubmit={expandNextStep}
|
||||||
arguments: [],
|
onChange={handleChange}
|
||||||
}}
|
step={step}
|
||||||
onExpand={() => toggleSubstep(0)}
|
/>
|
||||||
onCollapse={() => toggleSubstep(0)}
|
|
||||||
onSubmit={expandNextStep}
|
|
||||||
onChange={handleChange}
|
|
||||||
step={step}
|
|
||||||
/>
|
|
||||||
|
|
||||||
{actionOrTrigger &&
|
|
||||||
substeps?.length > 0 &&
|
|
||||||
substeps.map((substep, index) => (
|
|
||||||
<React.Fragment key={`${substep?.name}-${index}`}>
|
|
||||||
{substep.key === 'chooseConnection' && app && (
|
|
||||||
<ChooseConnectionSubstep
|
|
||||||
expanded={currentSubstep === index + 1}
|
|
||||||
substep={substep}
|
|
||||||
onExpand={() => toggleSubstep(index + 1)}
|
|
||||||
onCollapse={() => toggleSubstep(index + 1)}
|
|
||||||
onSubmit={expandNextStep}
|
|
||||||
onChange={handleChange}
|
|
||||||
application={app}
|
|
||||||
step={step}
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
|
|
||||||
|
{actionOrTrigger &&
|
||||||
|
substeps?.length > 0 &&
|
||||||
|
substeps.map((substep, index) => (
|
||||||
|
<React.Fragment key={`${substep?.name}-${index}`}>
|
||||||
|
{substep.key === 'chooseConnection' && app && (
|
||||||
|
<ChooseConnectionSubstep
|
||||||
|
expanded={currentSubstep === index + 1}
|
||||||
|
substep={substep}
|
||||||
|
onExpand={() => toggleSubstep(index + 1)}
|
||||||
|
onCollapse={() => toggleSubstep(index + 1)}
|
||||||
|
onSubmit={expandNextStep}
|
||||||
|
onChange={handleChange}
|
||||||
|
application={app}
|
||||||
|
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}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</React.Fragment>
|
</Form>
|
||||||
))}
|
</React.Fragment>
|
||||||
</Form>
|
))}
|
||||||
</StepExecutionsProvider>
|
</StepExecutionsProvider>
|
||||||
</List>
|
</List>
|
||||||
</Content>
|
</Content>
|
||||||
|
Reference in New Issue
Block a user