From c830dcd3b3429ab179ee7fbdd4cbc437d48f5a17 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Fri, 11 Jun 2021 22:49:12 +0000 Subject: [PATCH] --- ayanova/src/api/gzform.js | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/ayanova/src/api/gzform.js b/ayanova/src/api/gzform.js index d22adee6..84b0f378 100644 --- a/ayanova/src/api/gzform.js +++ b/ayanova/src/api/gzform.js @@ -47,9 +47,18 @@ function isNumber(n) { // Get control from ref // function getControl(vm, ref) { - //NOTE: Due to automatic code formatting some refs will come here with newlines in them resulting in no matches - ref = ref.replace(/\s/g, ""); let ctrl = vm.$refs[ref]; + // if (vm.$ay.dev) { + // // //NOTE: Due to automatic code formatting some refs will come here with newlines in them resulting in no matches + // // console.log("ref before is", ref); + // // let tref = ref.replace(/\s/g, ""); + // // console.log("gzform::getcontrol, ref is ", { tref: tref, ref: ref }); + // if (ctrl == null) { + // console.log(`gzform::getControl ref ${ref} not found on form`); + // } else { + // console.log(`gzform::getControl ref ${ref} *WAS* found on form!`); + // } + // } return ctrl; } @@ -799,11 +808,14 @@ export default { if (formReference == undefined) { formControl = vm.$refs.form; } else { - //NOTE: Due to automatic code formatting some refs will come here with newlines in them resulting in no matches + //NOTE: Due to automatic code formatting some refs may come here with newlines in them resulting in no matches formReference = formReference.replace(/\s/g, ""); formControl = vm.$refs[formReference]; } + //NOTE: Due to automatic code formatting some refs may come here with newlines in them resulting in no matches + // ref = ref.replace(/\s/g, ""); + //dev error on form? if (formControl == null) { if (vm.$ay.dev) { @@ -1000,8 +1012,8 @@ export default { // Get validity of referenced control // controlIsValid(vm, ref) { - //NOTE: Due to automatic code formatting some refs will come here with newlines in them resulting in no matches - ref = ref.replace(/\s/g, ""); + // //NOTE: Due to automatic code formatting some refs will come here with newlines in them resulting in no matches + // ref = ref.replace(/\s/g, ""); if (vm.$refs[ref]) { return vm.$refs[ref].valid; }