This commit is contained in:
2020-03-24 19:02:26 +00:00
parent 21295dbe98
commit 6874b5d46d
2 changed files with 19 additions and 20 deletions

View File

@@ -21,7 +21,6 @@
:prepend-icon="errorIcon" :prepend-icon="errorIcon"
@click:prepend="handleErrorClick" @click:prepend="handleErrorClick"
@mousedown="dropdown" @mousedown="dropdown"
cache-items
> >
<template v-slot:prepend-item v-if="hasError()"> <template v-slot:prepend-item v-if="hasError()">
<div class="pl-2"> <div class="pl-2">
@@ -36,7 +35,7 @@
/* eslint-disable */ /* eslint-disable */
//////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////
//NOTE: have to import lodash directly here as no combination was working with the window.$gz._ //NOTE: have to import lodash directly here as no combination was working with the window.$gz._
//it would not recognize window in the function call //it would not recognize window in the function call cache-items
import _ from "../libs/lodash.min.js"; import _ from "../libs/lodash.min.js";
/* /*
States States
@@ -150,11 +149,11 @@ export default {
} }
} }
console.log( // console.log(
"watch:searchentry cleared check to see if it's a selected list item, doing search for ", // "watch:searchentry cleared check to see if it's a selected list item, doing search for ",
val // val
); // );
console.log("search results:", vm.searchResults); // console.log("search results:", vm.searchResults);
if (!val || vm.fetching || !vm.initialized) { if (!val || vm.fetching || !vm.initialized) {
if (!vm.initialized) { if (!vm.initialized) {
@@ -203,7 +202,7 @@ export default {
this.lastSelection = e; this.lastSelection = e;
}, },
replaceLastSelection() { replaceLastSelection() {
console.log("replace last selection top"); // console.log("replace last selection top");
var vm = this; var vm = this;
//check if searchREsults has last selection, if not then add it back in again //check if searchREsults has last selection, if not then add it back in again
if (vm.lastSelection == null) { if (vm.lastSelection == null) {
@@ -211,30 +210,30 @@ export default {
for (var i = 0; i < vm.searchResults.length; i++) { for (var i = 0; i < vm.searchResults.length; i++) {
if (vm.searchResults[i].id == vm.value) { if (vm.searchResults[i].id == vm.value) {
console.log( // console.log(
"rpl last selection null but found in list so setting last selection" // "rpl last selection null but found in list so setting last selection"
); // );
vm.lastSelection = vm.searchResults[i]; vm.lastSelection = vm.searchResults[i];
return; return;
} }
} }
console.log("RPL bailing as last selection is null and not in list"); // console.log("RPL bailing as last selection is null and not in list");
return; return;
} }
for (var i = 0; i < vm.searchResults.length; i++) { for (var i = 0; i < vm.searchResults.length; i++) {
if (vm.searchResults[i].id == vm.lastSelection.id) { if (vm.searchResults[i].id == vm.lastSelection.id) {
console.log("replacelastselection bailing, it's in list already"); //console.log("replacelastselection bailing, it's in list already");
return; return;
} }
} }
vm.searchResults.push(vm.lastSelection); vm.searchResults.push(vm.lastSelection);
console.log( // console.log(
"replacelastselection bottom, search results now:", // "replacelastselection bottom, search results now:",
vm.searchResults // vm.searchResults
); // );
}, },
dropdown(e) { dropdown(e) {
var vm = this; var vm = this;

View File

@@ -7,12 +7,12 @@
> >
</gz-pick-list> </gz-pick-list>
<v-divider></v-divider> <v-divider></v-divider>
<!-- <gz-pick-list <gz-pick-list
v-model="selectedUser" v-model="selectedUser"
:ayaType="ayaType().User" :ayaType="ayaType().User"
:label="lt('User')" :label="lt('User')"
> >
</gz-pick-list> --> </gz-pick-list>
<v-divider></v-divider> <v-divider></v-divider>
<div>FORM Selected Widget: {{ selectedWidget }}</div> <div>FORM Selected Widget: {{ selectedWidget }}</div>
<div>FORM Selected User: {{ selectedUser }}</div> <div>FORM Selected User: {{ selectedUser }}</div>
@@ -46,7 +46,7 @@ export default {
}, },
data() { data() {
return { return {
selectedWidget: 2, selectedWidget: 0,
selectedUser: 2 selectedUser: 2
}; };
}, },