diff --git a/src/views/feature_type/Feature_type_edit.vue b/src/views/feature_type/Feature_type_edit.vue index 8786d6d25fd55758885d54420e66447efed1845d..889b249c57ac0a46328cf403f68e8b9c612cdd3f 100644 --- a/src/views/feature_type/Feature_type_edit.vue +++ b/src/views/feature_type/Feature_type_edit.vue @@ -98,8 +98,8 @@ </div> <div class="colors_selection" id="id_colors_selection" hidden> <div - v-for="(value, key) in form.colors_style.value.colors" - :key="'colors_style-' + key" + v-for="(value, key, index) in form.colors_style.value.colors" + :key="'colors_style-' + index" class="color-input" > <label>{{ key }}</label @@ -268,9 +268,14 @@ export default { }, selected_colors_style: { get() { - return this.form.colors_style.value.custom_field_name; + const value = this.form.colors_style.value.custom_field_name; + const customField = this.customForms.find((el) => el.name === value); + return customField && customField.length !== 0 + ? customField.label + : value; }, set(newValue) { + console.log(newValue); const newColorsStyle = { colors: { [newValue.options[0]]: "#000000",