In mat-vertical-stepper
I have 4 mat-step
. How can I have tick-mark once 1st step is completed?
I tried:
<mat-vertical-stepper style="background:#f2ecec;" #stepper [linear]="true">
<mat-step label="General Details" [stepControl]="generalDetailsForm" completed="true" editable="true">
<h3> Name </h3>
</mat-step>
</mat-vertical-stepper>
If I make editable="false"
, it is giving a tick mark and can't be editable as I made it "false"
.
Having only completed="true"
I am not getting any tick mark at all.
need help for:
According to the docs, icons can now be customized like this:
<mat-vertical-stepper>
<ng-template matStepperIcon="edit">
<custom-icon>edit</custom-icon>
</ng-template>
<ng-template matStepperIcon="done">
<custom-icon>done</custom-icon>
</ng-template>
<!-- Stepper steps go here -->
</mat-vertical-stepper>
In the official docs, it says:
Note that if both
completed
andstepControl
are set, thestepControl
will take precedence.
So, if you want to use the completed attribute you need to delete your stepControl
.
If you want to change the icon, you might have to wait for this commit to be merged. Also, have a look at the MatStepHeader directive. It has an icon
input property you can set; e.g. icon="done"
for your tick mark.
There does not seem to be an option to change the color via the API, yet. As a workaround, you could use something like:
/deep/ .mat-step-header .mat-step-icon {
background-color: red;
}