This commit is contained in:
@@ -18,10 +18,9 @@
|
||||
:search-input.sync="searchEntry"
|
||||
auto-select-first
|
||||
:multiple="multiple"
|
||||
hide-no-data
|
||||
no-filter
|
||||
>
|
||||
<!-- <template v-slot:no-data>no-filter hide-selected v-on:input="$emit('input', $event)" cache-items="false"
|
||||
<!-- <template v-slot:no-data>no-filter hide-selected v-on:input="$emit('input', $event)" cache-items="false"
|
||||
<v-list-item>
|
||||
<v-list-item-title>
|
||||
Search for your favorite
|
||||
@@ -67,6 +66,8 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
/* eslint-disable */
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//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
|
||||
import _ from "../libs/lodash.min.js";
|
||||
//todo: empty item support
|
||||
//todo: custom filter that works with tags (ignore tag part and filter as normal)
|
||||
@@ -137,13 +138,7 @@ export default {
|
||||
return;
|
||||
}
|
||||
}
|
||||
console.log("Calling test from watcher");
|
||||
// this.test();
|
||||
|
||||
this.doSearch();
|
||||
//doSearch(vm, val);
|
||||
//window.$gz._.debounce(doSearch(vm, val), 1300);
|
||||
//debounce and don't search constantly on every keystroke
|
||||
},
|
||||
value(val) {
|
||||
//this ensures the parent form gets the onchange event
|
||||
@@ -158,18 +153,9 @@ export default {
|
||||
lt: function(ltkey) {
|
||||
return window.$gz.translation.get(ltkey);
|
||||
},
|
||||
test: _.debounce(function() {
|
||||
console.log("log from inside debounce");
|
||||
}, 500),
|
||||
// test: function() {
|
||||
// console.log("In test calling debounce...");
|
||||
// window.$gz._.debounce(function() {
|
||||
// console.log("log from inside debounce");
|
||||
// }, 500);
|
||||
// },
|
||||
doSearch: _.debounce(function() {
|
||||
var vm=this;
|
||||
console.log("Inside Debounced function");
|
||||
var vm = this;
|
||||
|
||||
//NOTE debounce with a watcher is a bit different
|
||||
//https://vuejs.org/v2/guide/migration.html#debounce-Param-Attribute-for-v-model-removed
|
||||
//-----------------
|
||||
@@ -254,6 +240,7 @@ export default {
|
||||
urlParams += "&inactive=true";
|
||||
}
|
||||
|
||||
console.log("sending search to server ", urlParams);
|
||||
window.$gz.api
|
||||
.get("PickList/List" + urlParams)
|
||||
.then(res => {
|
||||
@@ -271,7 +258,7 @@ export default {
|
||||
});
|
||||
|
||||
//------------
|
||||
}, 500)
|
||||
}, 800)
|
||||
},
|
||||
beforeCreate() {
|
||||
//check pre-requisites exist just in case
|
||||
|
||||
Reference in New Issue
Block a user