post food_tree bug fixing

This commit is contained in:
smilerz
2021-09-04 16:41:57 -05:00
parent 738387ccf0
commit b147c975b8
19 changed files with 90 additions and 97 deletions

View File

@ -4,12 +4,14 @@
:options="objects"
:close-on-select="true"
:clear-on-select="true"
:hide-selected="true"
:hide-selected="multiple"
:preserve-search="true"
:placeholder="lookupPlaceholder"
:label="label"
track-by="id"
:multiple="multiple"
:taggable="create_new"
:tag-placeholder="createText"
:loading="loading"
@search-change="search"
@input="selectionChanged">
@ -41,7 +43,9 @@ export default {
limit: {type: Number, default: 10,},
sticky_options: {type:Array, default(){return []}},
initial_selection: {type:Array, default(){return []}},
multiple: {type: Boolean, default: true}
multiple: {type: Boolean, default: true},
create_new: {type: Boolean, default: false}, // TODO: this will create option to add new drop-downs
create_text: {type: String, default: 'You Forgot to Add a Tag Placeholder'},
},
watch: {
initial_selection: function (newVal, oldVal) { // watch it
@ -64,6 +68,9 @@ export default {
lookupPlaceholder() {
return this.placeholder || this.model.name || this.$t('Search')
},
createText() {
return this.create_text
},
},
methods: {
// this.genericAPI inherited from ApiMixin