Commit 9888e443 authored by MARCO Jonathan's avatar MARCO Jonathan
Browse files

馃悰 Fix the condition display on the data tab for select component

Fixes VUE-FORMBUILDER-8Z
parent 969b9ee7
Pipeline #63926 passed with stage
in 14 seconds
......@@ -131,7 +131,7 @@
<template v-slot:item.displayedBy="{ item }">
<v-edit-dialog :return-value="item.displayedBy">
<span v-if="Array.isArray(item.displayedBy) && item.displayedBy.length">
{{ getOption(item.displayedBy[0]).label }}
{{ getLabelOption(item.displayedBy[0]) || item.displayedBy[0] }}
<span v-if="item.displayedBy.length > 1" class="grey--text caption">
{{ `(+${item.displayedBy.length - 1} others)` }}
</span>
......@@ -346,9 +346,12 @@ export default Vue.extend({
return itemLabel.toLowerCase().includes(search)
},
getOption(id) {
getOption(id): Option {
return this.$store.getters['form/getOptionByIdOrValue'](id);
},
getLabelOption(id): undefined | string {
return this.getOption(id)?.label
},
onUpdateDefaultOption(newValue, item) {
this.updateDefaultOption({
newDefaultOptionId: item.id,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment