This commit is contained in:
@@ -48,7 +48,8 @@ CURRENT TODOs
|
|||||||
@@@@@@@@@@@ ROADMAP STAGE 1 and 2:
|
@@@@@@@@@@@ ROADMAP STAGE 1 and 2:
|
||||||
|
|
||||||
|
|
||||||
|
todo: consider adding a global setting that allows case *in*sensitive searches or vice versa for picklists
|
||||||
|
- Case is a pain in the ass on devices
|
||||||
todo: make sure that the picklist control has a delay in it so it doesn't go search on every character typed
|
todo: make sure that the picklist control has a delay in it so it doesn't go search on every character typed
|
||||||
- make some sane limits to it
|
- make some sane limits to it
|
||||||
todo: stuff below go-over and make sure nothing missed
|
todo: stuff below go-over and make sure nothing missed
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
label="lbl Widgets"
|
label="lbl Widgets"
|
||||||
v-model="selected"
|
v-model="selected"
|
||||||
return-object
|
return-object
|
||||||
:items="sourceresults"
|
:items="searchResults"
|
||||||
item-text="name"
|
item-text="name"
|
||||||
item-value="id"
|
item-value="id"
|
||||||
item-disabled="!active"
|
item-disabled="!active"
|
||||||
@@ -16,11 +16,12 @@
|
|||||||
:placeholder="lt('search hint here')"
|
:placeholder="lt('search hint here')"
|
||||||
:no-data-text="lt('NoData')"
|
:no-data-text="lt('NoData')"
|
||||||
:search-input.sync="searchEntry"
|
:search-input.sync="searchEntry"
|
||||||
|
auto-select-first
|
||||||
:multiple="multiple"
|
:multiple="multiple"
|
||||||
cache-items
|
|
||||||
hide-no-data
|
hide-no-data
|
||||||
|
no-filter
|
||||||
>
|
>
|
||||||
<!-- <template v-slot:no-data>no-filter hide-selected v-on:input="$emit('input', $event)"
|
<!-- <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
|
||||||
@@ -57,8 +58,8 @@
|
|||||||
{{ searchEntry }}
|
{{ searchEntry }}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
sourceresults
|
searchResults
|
||||||
{{ sourceresults }}
|
{{ searchResults }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -66,15 +67,14 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
//NOTE: I had some concerns about how the selection is made, but leving it for now
|
//todo: empty item support
|
||||||
//basically the typed text stays after you select from dropdown, however, it clears as soon as you tab off
|
//todo: custom filter that works with tags (ignore tag part and filter as normal)
|
||||||
//and in theory it could help if picking more than one tag that have similar selection criteria
|
|
||||||
export default {
|
export default {
|
||||||
created() {
|
created() {
|
||||||
//need to add no selection object if specified
|
//need to add no selection object if specified
|
||||||
// var vm = this;
|
// var vm = this;
|
||||||
// if (vm.noSelectionValid) {
|
// if (vm.noSelectionValid) {
|
||||||
// window.$gz.form.addNoSelectionItem(vm.sourceresults);
|
// window.$gz.form.addNoSelectionItem(vm.searchResults);
|
||||||
// if (vm.value == null) {
|
// if (vm.value == null) {
|
||||||
// vm.value = 0;
|
// vm.value = 0;
|
||||||
// }
|
// }
|
||||||
@@ -84,14 +84,14 @@ export default {
|
|||||||
//Set the initial list items based on the record items, this only needs to be called once at init
|
//Set the initial list items based on the record items, this only needs to be called once at init
|
||||||
//Not sure what this is to picklist as it came from tags
|
//Not sure what this is to picklist as it came from tags
|
||||||
// if (!this.initialized && this.value.length > 0) {
|
// if (!this.initialized && this.value.length > 0) {
|
||||||
// this.sourceresults = this.value;
|
// this.searchResults = this.value;
|
||||||
// this.initialized = true;
|
// this.initialized = true;
|
||||||
// }
|
// }
|
||||||
},
|
},
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
sourceresults: [],
|
searchResults: [],
|
||||||
errors: [],
|
errors: [],
|
||||||
selected: { name: "-", id: 0 },
|
selected: { name: "-", id: 0 },
|
||||||
searchEntry: null,
|
searchEntry: null,
|
||||||
@@ -228,7 +228,7 @@ export default {
|
|||||||
//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
|
||||||
//Any search will be kept for later so this is very efficient
|
//Any search will be kept for later so this is very efficient
|
||||||
vm.sourceresults = res.data;
|
vm.searchResults = res.data;
|
||||||
vm.searchUnderway = false;
|
vm.searchUnderway = false;
|
||||||
})
|
})
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
|
|||||||
Reference in New Issue
Block a user