This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div>
|
||||
<span class="text-caption">
|
||||
<span class="text-caption" v-if="!noLabel">
|
||||
{{ title }}
|
||||
</span>
|
||||
<v-autocomplete
|
||||
@@ -9,7 +9,7 @@
|
||||
:readonly="readonly"
|
||||
:items="sourcetags"
|
||||
:loading="tagSearchUnderway"
|
||||
:placeholder="$ay.t('TypeToSearchOrAdd')"
|
||||
:placeholder="placeHolderText"
|
||||
:no-data-text="$ay.t('NoData')"
|
||||
:search-input.sync="tagSearchEntry"
|
||||
hide-selected
|
||||
@@ -63,7 +63,13 @@ export default {
|
||||
},
|
||||
readonly: { type: Boolean, default: false },
|
||||
rules: { type: Array, default: undefined },
|
||||
errorMessages: { type: Array, default: null }
|
||||
errorMessages: { type: Array, default: null },
|
||||
selectOnly: { type: Boolean, default: false },
|
||||
noLabel: { type: Boolean, default: false },
|
||||
placeHolder: {
|
||||
type: String,
|
||||
default: null
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
async tagSearchEntry(val) {
|
||||
@@ -93,11 +99,21 @@ export default {
|
||||
return this.label;
|
||||
}
|
||||
return this.$ay.t("Tags");
|
||||
},
|
||||
placeHolderText() {
|
||||
if (this.placeHolder) {
|
||||
return this.placeHolder;
|
||||
}
|
||||
return this.$ay.t("TypeToSearchOrAdd");
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
offerAdd() {
|
||||
if (this.tagSearchEntry == null || this.tagSearchEntry == "") {
|
||||
if (
|
||||
this.selectOnly ||
|
||||
this.tagSearchEntry == null ||
|
||||
this.tagSearchEntry == ""
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
const searchTag = this.normalizeTag(this.tagSearchEntry);
|
||||
|
||||
Reference in New Issue
Block a user