Merge pull request #511 from Safelite/defect/digital/SSR-751
SSR-751 Fix Vehicle Selection allowing continue with no style selected
This commit is contained in:
commit
908e43ad25
1 changed files with 5 additions and 3 deletions
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div
|
||||
class="dropdown-question"
|
||||
:class="(errors && errors.length) || hasError ? 'has-error' : ''">
|
||||
:class="(meta.touched && errors && errors.length) || hasError ? 'has-error' : ''">
|
||||
<label
|
||||
:for="inputId"
|
||||
:aria-label="questionText"
|
||||
|
|
@ -31,7 +31,7 @@
|
|||
</option>
|
||||
</select>
|
||||
<div
|
||||
v-show="errorMessage && !isDisabled"
|
||||
v-show="meta.touched && errorMessage && !isDisabled"
|
||||
class="row mt-1 form-test-error">
|
||||
<span role="alert">{{ errorMessage }}</span>
|
||||
</div>
|
||||
|
|
@ -82,6 +82,7 @@ export default {
|
|||
const { errorMessage,
|
||||
handleBlur,
|
||||
handleChange,
|
||||
setTouched,
|
||||
meta, errors,
|
||||
setErrors } = useField(props.inputId, props.validationRules, fieldOptions);
|
||||
|
||||
|
|
@ -91,6 +92,7 @@ export default {
|
|||
handleChange,
|
||||
meta,
|
||||
errors,
|
||||
setTouched,
|
||||
setErrors
|
||||
};
|
||||
},
|
||||
|
|
@ -130,7 +132,7 @@ export default {
|
|||
watch: {
|
||||
isDisabled(newValue, oldValue) {
|
||||
if (newValue !== oldValue) {
|
||||
this.setErrors([]);
|
||||
this.setTouched(false, null);
|
||||
}
|
||||
},
|
||||
selectedOption(newValue) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue