This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user