4

I have a material stepper and the mode is set to linear.

next button is working just fine but the pevious button is not working.

I also tried to work with matStepperPrevious & matStepperNext

Link to the stackblitsz I created: https://stackblitz.com/edit/angular-ivy-galdj7?file=src/app/app.component.ts

Babulaas
  • 761
  • 3
  • 13
  • 47
  • 2
    You are setting the first step to editable false. Remove the line and it works, or set editable true again when going back. – MoxxiManagarm Jul 14 '22 at 12:11
  • And how do set these (completed & editbale) values for a specific step. You can trigger the current /selected step but I do not know how you can set a specific step (by example by index) – Babulaas Jul 14 '22 at 12:15
  • @MoxxiManagarm Thank you for the feedback I removed the "editble" line. This is probably the way to go. – Babulaas Jul 14 '22 at 13:28

1 Answers1

1

adding to @MoxxiManagarm comment youre setting editable to flase remove it and add this

 oneStepBack() {
 this.stepper.previous();
}
Faizal Hussain
  • 1,551
  • 2
  • 10
  • 18
  • I already tried to use function. If I do this the step wil never complete. Editbale will be false for al steps. I want to set this for a specific step (by index) and not for all. – Babulaas Jul 14 '22 at 13:00
  • do you want to editable to be false at the last step ? – Faizal Hussain Jul 14 '22 at 13:01