diff --git a/ayanova/src/components/pick-list.vue b/ayanova/src/components/pick-list.vue index 0bd8f8dc..26cd31c5 100644 --- a/ayanova/src/components/pick-list.vue +++ b/ayanova/src/components/pick-list.vue @@ -18,21 +18,14 @@ hide-no-data clearable :no-filter="isTagFilter" + :prepend-icon="errorIcon" + @click:prepend="handleErrorClick" > - @@ -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