diff --git a/ayanova/devdocs/todo.txt b/ayanova/devdocs/todo.txt index c992f421..8ebd3c3f 100644 --- a/ayanova/devdocs/todo.txt +++ b/ayanova/devdocs/todo.txt @@ -5,11 +5,6 @@ MISC ITEMS THAT CAME UP - -todo: picklist empty null vs zero - test with customer and headofficeid - should have the empty selection pre-selected or maybe I need to do away with that since the clear button does the same thing? - todo: missing feature, can't filter widgetlist by User due to no UserList being available Is this meant to be text only filter and we have no id filter system? How hard to add proper list selection and ID because it seems important? diff --git a/ayanova/src/api/gzform.js b/ayanova/src/api/gzform.js index fbd76751..510fcd12 100644 --- a/ayanova/src/api/gzform.js +++ b/ayanova/src/api/gzform.js @@ -986,6 +986,15 @@ export default { listArray.unshift({ name: "-", id: nullNotZero ? null : 0 }); }, //////////////////////////////////// + // Get no selection item + // Used by forms that need just the + // unselected item itself not added + // to a list + // + getNoSelectionItem(nullNotZero) { + return { name: "-", id: nullNotZero ? null : 0 }; + }, + //////////////////////////////////// // Get validity of referenced control // controlIsValid(vm, ref) { diff --git a/ayanova/src/components/pick-list.vue b/ayanova/src/components/pick-list.vue index 056baf35..ac2435fe 100644 --- a/ayanova/src/components/pick-list.vue +++ b/ayanova/src/components/pick-list.vue @@ -157,17 +157,17 @@ export default { type: this.ayaType, id: idToOpen }); - }, - selectionMade(e) { - this.clearErrors(); - if (e == undefined) { + }, + selectionMade(e) { + this.clearErrors(); + if (e == undefined) { //this will happen when clear clicked - return; - } - if (e.id != null) { - //this is required for the control to update and parent form to detect it - this.$emit("input", e.id); + //simulate empty selection: + e = window.$gz.form.getNoSelectionItem(true); } + + //this is required for the control to update and parent form to detect it + this.$emit("input", e.id); this.lastSelection = e; }, fetchValueIfNotPresent() { @@ -286,7 +286,7 @@ export default { //NOTE debounce with a watcher is a bit different, currently it has to be done exactly this way, nothing else will work properly //https://vuejs.org/v2/guide/migration.html#debounce-Param-Attribute-for-v-model-removed //----------------- - //console.log("doSearch debounced",searchFor); + let vm = this; let isATwoTermQuery = false; let queryTerms = []; diff --git a/ayanova/src/views/cust-customer.vue b/ayanova/src/views/cust-customer.vue index 32a74ad3..b800bc7b 100644 --- a/ayanova/src/views/cust-customer.vue +++ b/ayanova/src/views/cust-customer.vue @@ -2,7 +2,7 @@ - +