This commit is contained in:
@@ -47,9 +47,18 @@ function isNumber(n) {
|
|||||||
// Get control from ref
|
// Get control from ref
|
||||||
//
|
//
|
||||||
function getControl(vm, 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];
|
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;
|
return ctrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -799,11 +808,14 @@ export default {
|
|||||||
if (formReference == undefined) {
|
if (formReference == undefined) {
|
||||||
formControl = vm.$refs.form;
|
formControl = vm.$refs.form;
|
||||||
} else {
|
} 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, "");
|
formReference = formReference.replace(/\s/g, "");
|
||||||
formControl = vm.$refs[formReference];
|
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?
|
//dev error on form?
|
||||||
if (formControl == null) {
|
if (formControl == null) {
|
||||||
if (vm.$ay.dev) {
|
if (vm.$ay.dev) {
|
||||||
@@ -1000,8 +1012,8 @@ export default {
|
|||||||
// Get validity of referenced control
|
// Get validity of referenced control
|
||||||
//
|
//
|
||||||
controlIsValid(vm, ref) {
|
controlIsValid(vm, ref) {
|
||||||
//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 will come here with newlines in them resulting in no matches
|
||||||
ref = ref.replace(/\s/g, "");
|
// ref = ref.replace(/\s/g, "");
|
||||||
if (vm.$refs[ref]) {
|
if (vm.$refs[ref]) {
|
||||||
return vm.$refs[ref].valid;
|
return vm.$refs[ref].valid;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user