From 35ebf463cd3c875102ffaca91649e16b20a77672 Mon Sep 17 00:00:00 2001 From: acetousk Date: Thu, 28 Sep 2023 11:10:57 -0600 Subject: [PATCH] Fix submit on select drop down where there is one result (#219) --- base-component/webroot/screen/webroot/js/WebrootVue.qvt.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base-component/webroot/screen/webroot/js/WebrootVue.qvt.js b/base-component/webroot/screen/webroot/js/WebrootVue.qvt.js index 908410a03..47fedd29c 100644 --- a/base-component/webroot/screen/webroot/js/WebrootVue.qvt.js +++ b/base-component/webroot/screen/webroot/js/WebrootVue.qvt.js @@ -1685,7 +1685,7 @@ Vue.component('m-drop-down', { // console.warn("curOptions updated " + this.name + " allowEmpty " + this.allowEmpty + " value '" + this.value + "' " + " isInNewOptions " + isInNewOptions + ": " + JSON.stringify(options)); if (!isInNewOptions) { - if (!this.allowEmpty && !this.multiple && options && options.length && options[0].value && (!this.requiredManualSelect || options.length === 1)) { + if (!this.allowEmpty && !this.multiple && options && options.length && options[0].value && (!this.requiredManualSelect || (!this.submitOnSelect && options.length === 1))) { // simulate normal select behavior with no empty option (not allowEmpty) where first value is selected by default // console.warn("checkCurrentValue setting " + this.name + " to " + options[0].value + " options " + options.length); this.$emit('input', options[0].value);