form-wizard-vue3
form-wizard-vue3 copied to clipboard
[HELP] Prevent tab change
Hi there, is there a way to prevent the tab change if there are conditions not met.
I.e. I'm trying to use the onTabBeforeChange event to check parameters and prevent the change, but nothing I try appears to work.
const onTabBeforeChange = (index, oldIndex) => {
switch (currentTabIndex)
{
case 0:
if (selectedUtility.value == undefined && selectedBuilding.value == undefined)
//Prevent the change
break;
}
};
Thanks.
I am also looking for this kind of functionality. Let me know if you find anything out.
I don't know an exact solution for your approach. In my project i faced a similar problem and i wanted that the user can only continue the wizard if a condition was met. So, i enable and disable the continue button dynamically. How this could work is mentioned in this issue https://github.com/bahadirsofuoglu/form-wizard-vue3/issues/31