Added key for fields to ensure they are re-rendering correctly when updating the field config

This commit is contained in:
Dean 2024-01-04 12:12:51 +00:00
parent 443ca97152
commit e94f70a940
1 changed files with 3 additions and 3 deletions

View File

@ -138,10 +138,10 @@
},
}}
>
{#each enrichedSteps as step, idx}
{#each enrichedSteps as step, stepIdx}
<BlockComponent
type="formstep"
props={{ step: idx + 1, _instanceName: `Step ${idx + 1}` }}
props={{ step: stepIdx + 1, _instanceName: `Step ${stepIdx + 1}` }}
>
<BlockComponent
type="container"
@ -158,7 +158,7 @@
</BlockComponent>
<BlockComponent type="text" props={{ text: step.desc }} order={1} />
<BlockComponent type="fieldgroup" order={2}>
{#each step.fields as field, fieldIdx}
{#each step.fields as field, fieldIdx (`${field.field || field.name}_${stepIdx}_${fieldIdx}`)}
{#if getComponentForField(field)}
<BlockComponent
type={getComponentForField(field)}