Closed
Description
Bug, feature request, or proposal:
bug
What is the expected behavior?
I can remove a step at any time without the stepper crashing
What is the current behavior?
If an earlier step is removed while a later step is active, the current step disappears. If you manually click a still visible previous step, we get an error Error: Cannot set property 'interacted' of undefined
What are the steps to reproduce?
https://stackblitz.com/edit/angular-material2-issue-fm21qe
- toggling step 2 from step 1 works fine.
- toggling step 2 from step 3 breaks step 3
- after toggling from step 3, navigation to step 1 emits an error
What is the use-case or motivation for changing an existing behavior?
We can remove later steps using *ngIf
without issue, so one would presume they could remove a step at any time. If it's decided that removing a previous step doesn't make sense, this should at least fail gracefully.
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
6.2.0