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:
commit
4697398d10
1 changed files with 12 additions and 0 deletions
|
|
@ -66,6 +66,18 @@ export default {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
watch: {
|
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: {
|
isMobileOnly: {
|
||||||
handler(newValue) {
|
handler(newValue) {
|
||||||
if (newValue) {
|
if (newValue) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue