diff --git a/legalconsenthub/components/FormEngine.vue b/legalconsenthub/components/FormEngine.vue index 9ff2b28..e56ae05 100644 --- a/legalconsenthub/components/FormEngine.vue +++ b/legalconsenthub/components/FormEngine.vue @@ -1,9 +1,9 @@ @@ -35,9 +35,9 @@ function getResolvedComponent(formElement: FormElementDto) { } } -function updateFormOptions(formOptions: FormOptionDto[]) { +function updateFormOptions(formOptions: FormOptionDto[], formElementIndex: number) { const updatedModelValue = [...props.modelValue] - updatedModelValue[0] = { ...updatedModelValue[0], options: formOptions } + updatedModelValue[formElementIndex] = { ...updatedModelValue[formElementIndex], options: formOptions } emit('update:modelValue', updatedModelValue) }