stepper how to prevent selectionChange on programatically next

51 Views Asked by At

I have a mat-stepper, and I want to manage the event when a step is manually is clicked by the user, or with a button in the view.

<mat-stepper (selectionChange)="onSelectFromStepper($event)">
     <mat-step> 
        <mat-button (click)="onNextFromStep()" </button>
     </mat-step>
 </mat-stepper>

onSelectFromStepper(selected: any) {
   console.log("from stepper");
}

onNextFromStep() {
  this.stepper.next(); //it fires the selectionChange event, how to prevent??
}

how can I prevent the selectionChange to be fired from the next() ??

0

There are 0 best solutions below