This commit is contained in:
@@ -47,17 +47,9 @@ 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];
|
||||
|
||||
//I don't think this is required anymore
|
||||
// if (ctrl === undefined) {
|
||||
// //it's either a sub field in custom fields component or it's a coding error
|
||||
// let customFields = vm.$refs["customFields"];
|
||||
// if (customFields !== undefined) {
|
||||
// ctrl = customFields.$refs[ref];
|
||||
// }
|
||||
// }
|
||||
|
||||
return ctrl;
|
||||
}
|
||||
|
||||
@@ -807,6 +799,8 @@ 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
|
||||
formReference = formReference.replace(/\s/g, "");
|
||||
formControl = vm.$refs[formReference];
|
||||
}
|
||||
|
||||
@@ -1006,6 +1000,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, "");
|
||||
if (vm.$refs[ref]) {
|
||||
return vm.$refs[ref].valid;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user