I have a simple three question onboarding form, I am trying to use the wizard for.
beforeTabSwitch does not appear to be called when I switch between the form elements. Here is my component:
<template>
<div>
...
<form-wizard @on-complete="onComplete">
<tab-content title="Location">
<p>looks like you're at {{address}}, correct?</p>
<b-form role="form" @submit.prevent="handleSubmit(login)">
<base-input alternative
class="mb-3"
name=""
:rules="{required: true}"
prepend-icon="ni ni-pin-3"
v-model="address">
</base-input>
</b-form>
</tab-content>
...
<div class="mt-3">Selected: <strong>{{ selected }}</strong></div>
</tab-content>
</form-wizard>
</div>
</template>
<script>
...
methods: {
onComplete: function(){
alert(this.$store.state.auth.userPrefs.genre);
},
beforeTabSwitch: function(){
alert("This is called before switching tabs")
return true;
}
}
}
</script>