From 54bb370bfb17acd7c47edb1124b16b6d69d07ffe Mon Sep 17 00:00:00 2001 From: Denis Lugowski Date: Sat, 1 Mar 2025 10:30:21 +0100 Subject: [PATCH] fix(frontend): Wrong index when updating FormElement --- legalconsenthub/components/FormEngine.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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) }