This commit is contained in:
@@ -18,21 +18,14 @@
|
||||
hide-no-data
|
||||
clearable
|
||||
:no-filter="isTagFilter"
|
||||
:prepend-icon="errorIcon"
|
||||
@click:prepend="handleErrorClick"
|
||||
>
|
||||
<template v-slot:prepend-item v-if="hasError()">
|
||||
<div class="pl-2">
|
||||
<span class="error--text"> {{ errors[0] }}</span>
|
||||
</div>
|
||||
</template>
|
||||
<!-- <template v-slot:no-data> hide-selected v-on:input="$emit('input', $event)" cache-items="false":no-data-text="lt('NoData')"
|
||||
<v-list-item>
|
||||
<v-list-item-title>
|
||||
Search for your favorite
|
||||
<strong>PICKLIST ITEM</strong>
|
||||
some kind of hint here?
|
||||
</v-list-item-title>
|
||||
</v-list-item>
|
||||
</template> -->
|
||||
</v-autocomplete>
|
||||
<!-- <div>autocomplete selected item: {{ selected }}</div>
|
||||
<div>searchResults: {{ searchResults }}</div> -->
|
||||
@@ -101,7 +94,8 @@ export default {
|
||||
selected: { name: "-", id: 0 },
|
||||
searchEntry: null,
|
||||
searchUnderway: false,
|
||||
isTagFilter: false
|
||||
isTagFilter: false,
|
||||
errorIcon: null
|
||||
//,initialized: false
|
||||
};
|
||||
},
|
||||
@@ -155,6 +149,13 @@ export default {
|
||||
//To answer above it appears both are necessary for proper operation
|
||||
this.$emit("input", val);
|
||||
this.$emit("change", val);
|
||||
},
|
||||
errors(val) {
|
||||
if (this.hasError()) {
|
||||
this.errorIcon = "fa-question-circle";
|
||||
} else {
|
||||
this.errorIcon = null;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -165,6 +166,13 @@ export default {
|
||||
hasError: function() {
|
||||
return this.errors.length > 0;
|
||||
},
|
||||
handleErrorClick: function() {
|
||||
//open help nav for picklist
|
||||
window.$gz.eventBus.$emit("menu-click", {
|
||||
key: "app:help",
|
||||
data: "form-home-dashboard"
|
||||
});
|
||||
},
|
||||
customFilter(item, queryText, itemText) {
|
||||
//NOTE: I wanted this to work with tags but all it does is highlight all of each row if tag query is present
|
||||
//I guess because it later on attempts to do the highlighting and can't find all the entered query
|
||||
|
||||
Reference in New Issue
Block a user