vue-form-wizard icon indicating copy to clipboard operation
vue-form-wizard copied to clipboard

Prevents emitTabChange if entire FormWizard component is removed

Open paulogiacomelli opened this issue 4 years ago • 2 comments

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.

paulogiacomelli avatar Aug 18 '20 20:08 paulogiacomelli

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.

BRafols avatar Sep 22 '20 07:09 BRafols

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!

paulogiacomelli avatar Sep 22 '20 16:09 paulogiacomelli