Browse Source

fix multipleTagsSelect options

axolotle 3 years ago
parent
commit
ddc19cd304
1 changed files with 4 additions and 4 deletions
  1. 4 4
      src/components/formItems/MultipleTagsSelect.vue

+ 4 - 4
src/components/formItems/MultipleTagsSelect.vue

@@ -10,10 +10,10 @@
         variant="outline-secondary" class="d-block rounded-0"
       >
         <b-dropdown-item-button
-          v-for="option in availableOptions" :key="option"
-          @click="addTag(option)"
+          v-for="tag in availableOptions" :key="tag.value"
+          @click="addTag(tag.text)"
         >
-          {{ option }}
+          {{ tag.text }}
         </b-dropdown-item-button>
       </b-dropdown>
 
@@ -43,7 +43,7 @@ export default {
 
   computed: {
     availableOptions () {
-      return this.options.filter(opt => this.value.indexOf(opt) === -1)
+      return this.options.filter(opt => this.value.indexOf(opt.text) === -1)
     }
   }
 }