This commit is contained in:
2020-03-19 00:00:52 +00:00
parent a079e5c7b6
commit e6fec8fbeb

View File

@@ -5,8 +5,7 @@
</span> --> </span> -->
<v-autocomplete <v-autocomplete
label="lbl Widgets" label="lbl Widgets"
model="selected" :model="selected"
return-object
v-on:input="$emit('input', $event)" v-on:input="$emit('input', $event)"
:items="sourceresults" :items="sourceresults"
item-text="name" item-text="name"
@@ -18,11 +17,9 @@
:search-input.sync="searchEntry" :search-input.sync="searchEntry"
:multiple="multiple" :multiple="multiple"
cache-items cache-items
hide-selected
hide-no-data hide-no-data
no-filter
> >
<!-- <template v-slot:no-data> <!-- <template v-slot:no-data>no-filter hide-selected return-object
<v-list-item> <v-list-item>
<v-list-item-title> <v-list-item-title>
Search for your favorite Search for your favorite
@@ -48,12 +45,12 @@
</v-autocomplete> </v-autocomplete>
<div> <div>
selected selected
{{ value }} {{ selected }}
</div> </div>
<div> <!-- <div>
value value
{{ value }} {{ value }}
</div> </div> -->
<div> <div>
searchEntry searchEntry
{{ searchEntry }} {{ searchEntry }}
@@ -94,17 +91,17 @@ export default {
data() { data() {
return { return {
sourceresults: [], sourceresults: [],
selected: {}, selected: { name: "-", id: 0 },
searchEntry: null, searchEntry: null,
searchUnderway: false searchUnderway: false
//,initialized: false //,initialized: false
}; };
}, },
props: { props: {
value: { // value: {
type: Number, // type: Number,
default: 0 // default: 0
}, // },
ayaType: { ayaType: {
type: Number, type: Number,
default: 0 default: 0
@@ -130,7 +127,10 @@ export default {
} }
console.log("watch::searchEntry,val=", val); console.log("watch::searchEntry,val=", val);
console.log("vm.selected=", vm.selected); if (vm.selected != null) {
console.log("vm.selected=", vm.selected);
debugger;
}
vm.searchUnderway = true; vm.searchUnderway = true;
var urlParams = "?ayaType=" + vm.ayaType; var urlParams = "?ayaType=" + vm.ayaType;
@@ -146,7 +146,7 @@ export default {
.get("PickList/List" + urlParams) .get("PickList/List" + urlParams)
.then(res => { .then(res => {
if (res.error) { if (res.error) {
throw res.error; // throw res.error;
} }
//adding this to the property will automatically have it cached by the autocomplete component //adding this to the property will automatically have it cached by the autocomplete component
//as cache-items has been set so this just needs to be set here once and all is well in future //as cache-items has been set so this just needs to be set here once and all is well in future