Skip to content
This repository has been archived by the owner on Jun 1, 2023. It is now read-only.

Prevents emitTabChange if entire FormWizard component is removed #349

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

paulogiacomelli
Copy link

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.

@BRafols
Copy link
Contributor

BRafols commented Sep 22, 2020

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.

@paulogiacomelli
Copy link
Author

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!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants