vue-form-wizard
vue-form-wizard copied to clipboard
Prevents emitTabChange if entire FormWizard component is removed
Currently, once we navigate away from the the view with vue-form-wizard
component, removeTab
function is called, which emits multiple tabChange events from emitTabChange
.
This PR's goal is to avoid calling removeTab
and consequently emitTabChange
if we are destroying the entire FormWizard component.
I think it is correct the way it is, can you expand on your use case? Why does it bother you that removeTab is called when destroying the wizard?
Thanks for your time.
Hey @BRafols,
Currently, we have actions that run on tabChange
. These actions can vary from showing a loading spinner to calling an integration. So, when a user goes back and forth in the FormWizard, these actions are getting called.
Let say the user is on a tab and on tabChange
, an action should run. Then, if the user navigates to a different section of our platform, (removing the FormWizard component), the removeTab
and its events gets called, and these actions run without the user really knowing.
Hope this helps clarify the use case.
Thank you for your time!