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

Re start Wizard #101

Closed
ReynerHL opened this issue Nov 22, 2017 · 2 comments
Closed

Re start Wizard #101

ReynerHL opened this issue Nov 22, 2017 · 2 comments

Comments

@ReynerHL
Copy link

Is there anyway to reset the wizard to its initial state? I mean, how can we mark all those steps already visited as "not visited" again? Lets suppose we have a Wizard with 4 steps, and when we are in the second, then we would like to reset the wizard pressing an "Start over again" button. Thanks in advance.

@cristijora
Copy link
Collaborator

@ReynerHL There is no predefined method for this.
You could do it like this

     this.$refs.wizard.maxStep = 0
      this.$refs.wizard.tabs.forEach((tab)=>{
     	 tab.checked = false
      })
      this.$refs.wizard.navigateToTab(0)

I will add a method so you can call it directly

cristijora added a commit that referenced this issue Nov 27, 2017
@cristijora
Copy link
Collaborator

Released a new version 0.8.1
which has a reset method.
Calling it will reset the wizard to the initial state. Note that this method resets the steps only and is not responsible for what you have in your forms.
this.$refs.wizard.reset()
https://jsfiddle.net/bt5dhqtf/1599/

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

No branches or pull requests

2 participants