From 9f638f2b75f4c83092ffda08cf51e7ffd6eefa85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Poussard?= <tpoussard@neogeo.fr> Date: Thu, 7 Mar 2024 18:37:54 +0100 Subject: [PATCH] adapt extraForm to work with project-attributes id --- src/components/ExtraForm.vue | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/components/ExtraForm.vue b/src/components/ExtraForm.vue index ff173df8..a10641b9 100644 --- a/src/components/ExtraForm.vue +++ b/src/components/ExtraForm.vue @@ -97,18 +97,18 @@ > <div v-for="option in field.options" - :key="option" + :key="option.id || option" class="ui checkbox" > <input - :id="option" + :id="option.id || option" type="checkbox" - :checked="field.value && field.value.includes(option)" - :name="option" + :checked="field.value && field.value.includes(option.id || option)" + :name="option.id || option" @change="selectMultipleCheckbox" > - <label :for="option"> - {{ option }} + <label :for="option.id || option"> + {{ option.name || option }} </label> </div> </div> @@ -207,7 +207,7 @@ export default { set(newValue) { //* set the value selected in the dropdown if (this.useValueOnly) { - this.$emit('update:value', newValue); + this.$emit('update:value', newValue.id || newValue); } else { const newExtraForm = this.field; newExtraForm['value'] = newValue; -- GitLab