ChrisK
ChrisK

Reputation: 99

Clarity Wizard - Jump to page X on open (clrWizardOpenChange)

I've created a wizard with three pages. When the wizard opens, I want to directy navigate to page two and not start one page one.

I tried to use the clrWizardOpenChange Event on my wizard, but this.wizard.pages seems to be undefined or no pages are initialized at this moment.

Is there some way to achieve this behaviour?

Stackblitz

Upvotes: 0

Views: 387

Answers (1)

Eudes
Eudes

Reputation: 1661

You're opening the wizard in the ngOnInit() of your own component. At that point none of the views or the pages exist, your app is pretty much still bootstraping.

If I use a button to open the wizard and just group the "skip to second page" and the "open" in the same callback, it works fine: https://stackblitz.com/edit/open-wizard-page?file=app/app.component.ts

Upvotes: 2

Related Questions