-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stepper: Removing step does not reflect to header until clicked, then errors due to index = -1 #8397
Comments
Tracked it in the code, fix is simple, see PR #8398 |
actra-gschuster
added a commit
to actra-development-oss/angular-material2
that referenced
this issue
Nov 15, 2017
Now uses "emit on destroy" pattern for stepper to subscribe to step changes (fixes angular#8397)
jelbourn
pushed a commit
to actra-development-oss/angular-material2
that referenced
this issue
Nov 18, 2017
Now uses "emit on destroy" pattern for stepper to subscribe to step changes (fixes angular#8397)
jelbourn
pushed a commit
that referenced
this issue
Nov 18, 2017
Now uses "emit on destroy" pattern for stepper to subscribe to step changes (fixes #8397)
fix has been merged |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Bug, feature request, or proposal:
Bug report
What is the expected behavior?
When removing a step, e.g. by an *ngIf on the
<mat-step>
, the change should be reflected in the header (step not shown anymore).Dynamically adding the step seems to work without issues.
What is the current behavior?
Step still shows in header until I try to click on it, then it errors because CDKs doesn't check for invalid steps:
set selected(): this.selectedIndex = this._steps.toArray().indexOf(step);
The root cause of the problem is the change in the ContentChildren() not being reflected properly.
What is the use-case or motivation for changing an existing behavior?
Add / remove steps dynamically based on user inputs
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
ng 5.1.0-beta.0, material and cdk latest builds from today, typescript 2.6.1.
The text was updated successfully, but these errors were encountered: