Closed jmanos closed 6 months ago
HI @jmanos
As a short-term (and slightly hacky) solution, you can do the following:
beforeEnter: ()=>{
return new Promise((resolve, reject) => {
// Reject entering the step
reject('skip step')
// Prevent loading state from stopping step navigation
tg._promiseWaiting = false
// Get the desired step index based on direction
let skipToIndex = 3
if (tg.activeStep === 3) skipToIndex = 1
// Visit the desired step
tg.visitStep(skipToIndex)
})
}
I've had a look at an intuitive way to utilise a skipStep method and will require a little more thought, but under the hood it may look something like this anyway.
Triggering this inside the beforeLeave
callback is a little more problematic as it constantly calls itself when it tries to leave causing all sorts of mayhem.
Would it to be possible to add the ability to skip steps? Two helpful functionalities for our application would be:
The general idea is to be able to have a dynamic tour that can change depending on the state of the application, and maybe even have branching paths if necessary.