This commit is contained in:
2019-06-19 19:49:55 +00:00
parent f2015b16b1
commit c25df1264b

View File

@@ -149,14 +149,28 @@
:items="pickLists.tags" :items="pickLists.tags"
:loading="tagSearchUnderway" :loading="tagSearchUnderway"
:search-input.sync="searchTags" :search-input.sync="searchTags"
hide-no-data
hide-selected hide-selected
multiple multiple
chips chips
clearable clearable
deletable-chips deletable-chips
cache-items cache-items
></v-autocomplete> >
<template slot="no-data" v-if="searchTags">
<v-container>
<v-layout row>
<v-layout justify-start fill-height align-content-center>
Create new tag
</v-layout>
<v-layout justify-end>
<v-icon color="success" @click="addTag()"
>add {{ searchTags }} tag</v-icon
>
</v-layout>
</v-layout>
</v-container>
</template>
</v-autocomplete>
</v-flex> </v-flex>
<v-flex xs12 px-2> <v-flex xs12 px-2>
<v-textarea <v-textarea
@@ -342,7 +356,6 @@ export default {
deep: true deep: true
}, },
searchTags(val) { searchTags(val) {
TODO ADD ITEM??
var vm = this; var vm = this;
if (vm.tagSearchUnderway) { if (vm.tagSearchUnderway) {
return; return;
@@ -542,18 +555,25 @@ export default {
vm.$gzHandleFormError(error, vm); vm.$gzHandleFormError(error, vm);
}); });
} }
},
addTag(a, b, c) {
debugger;
//add tags to existing picklist so that it contains all the unique tags ever searched for or present in the object
//vm.pickLists.tags+=tags
//vm.pickLists.tags=uniqueonly(vm.pickLists.tags)
} }
} }
}; };
////////////////////// // //////////////////////
// // //
// // //
function addTagsToPickList(vm, tags) { // function addTag(a,b,c) {
//add tags to existing picklist so that it contains all the unique tags ever searched for or present in the object // debugger;
//vm.pickLists.tags+=tags // //add tags to existing picklist so that it contains all the unique tags ever searched for or present in the object
//vm.pickLists.tags=uniqueonly(vm.pickLists.tags) // //vm.pickLists.tags+=tags
} // //vm.pickLists.tags=uniqueonly(vm.pickLists.tags)
// }
///////////////////////////// /////////////////////////////
// //