You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add an click event that gets triggered when the step is clicked in the stepper component
What is the current behavior?
There's no such event.
What are the steps to reproduce?
NA
What is the use-case or motivation for changing an existing behavior?
We have some business logic that we need to save at each step. However if there is an error at the business layer, it should not proceed to the next step.
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Angular 4.4.3
Angular material 2.0.0-beta.11
Is there anything else we should know?
Tried to use selectionChange event, however encountered some issue eg.
public checkReturn: boolean = false; //prevent looping
doSomething(event) {
if (this.checkReturn === false) {
console.log(this.mdStepper.selectedIndex); //index is not yet changed
//do business logic saving
//if business logic saving return to previous page
this.checkReturn = true;
this.mdStepper.selectedIndex = event.previouslySelectedIndex; //not working because index is still the old index
}
else {
this.checkReturn = false;
}
}
Closing as click events are emitted from the element that is clicked. It should come from the browser automatically and be available to bind to as normal:
Bug, feature request, or proposal:
Feature request
What is the expected behavior?
Add an click event that gets triggered when the step is clicked in the stepper component
What is the current behavior?
There's no such event.
What are the steps to reproduce?
NA
What is the use-case or motivation for changing an existing behavior?
We have some business logic that we need to save at each step. However if there is an error at the business layer, it should not proceed to the next step.
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Angular 4.4.3
Angular material 2.0.0-beta.11
Is there anything else we should know?
Tried to use selectionChange event, however encountered some issue eg.
<md-horizontal-stepper (selectionChange)="doSomething($event)"></md-horizontal-stepper>
related to #7259
The text was updated successfully, but these errors were encountered: