CSR-319: remove console logs / comments
This commit is contained in:
parent
00d69f8710
commit
0bcd842aff
1 changed files with 0 additions and 7 deletions
|
|
@ -23,20 +23,13 @@ export default {
|
|||
},
|
||||
onSubmit() {}, // DO NOT REMOVE; needed to prevent default form submit behavior
|
||||
onInvalidSubmit({ values, errors, results }) {
|
||||
console.log('errors: ', errors)
|
||||
// {DamageLocationQuestion: 'Please select damage location'}
|
||||
// {driverSideOptions: 'Please select window', passengerSideOptions: 'Please select window'}
|
||||
|
||||
|
||||
// identify the first error field and put focus on it
|
||||
// get error names array
|
||||
const errorNames = errors ? Object.keys(errors) : [];
|
||||
const firstErrorEl = errorNames[0];
|
||||
if (firstErrorEl) {
|
||||
console.log('firstErrorEl: ', firstErrorEl)
|
||||
const qsString = "[data-focus-target='" + firstErrorEl + "']";
|
||||
const el = document.querySelector(qsString);
|
||||
console.log('el is: ', el)
|
||||
el && el.focus();
|
||||
}
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue