fix(frontend): Read current radio value out of prop formOptions

This commit is contained in:
2025-03-03 06:46:12 +01:00
parent fffa1086a5
commit 40e295937d

View File

@@ -16,10 +16,9 @@ const emit = defineEmits<{
// Our "label" is the "value" of the radio button
const items = computed(() => props.formOptions.map((option) => ({ label: option.label, value: option.label })))
const currentSelectedValue = ref(undefined)
const modelValue = computed({
get: () => currentSelectedValue.value,
get: () => props.formOptions.find((option) => option.value === 'true')?.label,
set: (val) => {
if (val) {
const updatedModelValue = [...props.formOptions]