Now auto-selecting the 'Mobile' option when it is the only option

This commit is contained in:
Leah Schumann 2023-04-26 08:17:36 -04:00
parent f419f265f0
commit 78b4190c37

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) {