This commit is contained in:
@@ -107,17 +107,11 @@ export default {
|
|||||||
vm.getList(urlParams);
|
vm.getList(urlParams);
|
||||||
}
|
}
|
||||||
|
|
||||||
// else if (vm.preFill) {
|
|
||||||
// //no non-empty initial value to select but list specified to pre-fill
|
|
||||||
// vm.searchUnderway = true;
|
|
||||||
// vm.getList();
|
|
||||||
// }
|
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
searchResults: [],
|
searchResults: [],
|
||||||
errors: [],
|
errors: [],
|
||||||
selected: { name: "-", id: 0 },
|
|
||||||
searchEntry: null,
|
searchEntry: null,
|
||||||
searchUnderway: false,
|
searchUnderway: false,
|
||||||
isTagFilter: false,
|
isTagFilter: false,
|
||||||
@@ -148,21 +142,14 @@ export default {
|
|||||||
searchEntry(val, oldVal) {
|
searchEntry(val, oldVal) {
|
||||||
var vm = this;
|
var vm = this;
|
||||||
//clear any local errors
|
//clear any local errors
|
||||||
vm.errors = [];
|
vm.errors = [];
|
||||||
// console.log("WATCH::SEARCHENTRY TRIGGERED: initialized=", vm.initialized);
|
|
||||||
|
|
||||||
//if the selected search entry is in the results list then it's just a selection made manually
|
//if the selected search entry is in the results list then it's just a selection made manually not a typed search so bail
|
||||||
//console.log("watch:searchentry search results=", vm.searchResults);
|
|
||||||
for (var i = 0; i < vm.searchResults.length; i++) {
|
for (var i = 0; i < vm.searchResults.length; i++) {
|
||||||
if (vm.searchResults[i].name == val) {
|
if (vm.searchResults[i].name == val) {
|
||||||
// console.log(
|
|
||||||
// "Search entry is in the search results so it was a seletion, bailing"
|
|
||||||
// );
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// console.log("val:", val);
|
|
||||||
// console.log("oldVal", oldVal);
|
|
||||||
|
|
||||||
if (!val || vm.searchUnderway || !vm.initialized) {
|
if (!val || vm.searchUnderway || !vm.initialized) {
|
||||||
if (!vm.initialized) {
|
if (!vm.initialized) {
|
||||||
@@ -171,30 +158,10 @@ export default {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (vm.selected != null) {
|
|
||||||
if (val == vm.selected.name) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// debugger;
|
|
||||||
this.doSearch();
|
this.doSearch();
|
||||||
},
|
},
|
||||||
// value(val) {
|
|
||||||
// //this ensures the parent form gets the onchange event
|
|
||||||
// //not actually sure why there are two here but it worked with the datetime picker so I replicated it here
|
|
||||||
// //To answer above it appears both are necessary for proper operation
|
|
||||||
// this.$emit("input", val);
|
|
||||||
// this.$emit("change", val);
|
|
||||||
// console.log("Watch:Value triggered:", val);
|
|
||||||
// },
|
|
||||||
// selected(val) {
|
|
||||||
// if (val && val.id) {
|
|
||||||
// console.log("Watch:Selected triggered:", val);
|
|
||||||
// this.$emit("input", val.id);
|
|
||||||
// this.$emit("change", val.id);
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
errors(val) {
|
errors(val) {
|
||||||
if (this.hasError()) {
|
if (this.hasError()) {
|
||||||
this.errorIcon = "fa-question-circle";
|
this.errorIcon = "fa-question-circle";
|
||||||
@@ -227,7 +194,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
dropdown(e) {
|
dropdown(e) {
|
||||||
console.log("DROPDOWN FIRED", e);
|
//console.log("DROPDOWN FIRED", e);
|
||||||
},
|
},
|
||||||
customFilter(item, queryText, itemText) {
|
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
|
//NOTE: I wanted this to work with tags but all it does is highlight all of each row if tag query is present
|
||||||
|
|||||||
Reference in New Issue
Block a user