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