Merge pull request #1080 from Safelite/defect/1353

Now auto-selecting the 'Mobile' option when it is the only option
This commit is contained in:
Leah Schumann 2023-04-26 08:27:03 -04:00 committed by GitHub
commit 4697398d10
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -66,6 +66,18 @@ export default {
},
},
watch: {
answersToDisplay: {
handler(newValue) {
// If there is only one option to display and that option is 'Mobile' then select it
if (
newValue.length == 1 &&
newValue.findIndex((answer) => answer.Name == "Mobile") != -1
) {
this.selectedValues = "Mobile";
}
},
immediate: true,
},
isMobileOnly: {
handler(newValue) {
if (newValue) {