Skip to content

Commit 9c23924

Browse files
committed
fix number state
1 parent f95e396 commit 9c23924

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

src/lib/stepper/step-header.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@
55
*ngSwitchCase="true"
66
[ngTemplateOutlet]="iconOverrides[state]"
77
[ngTemplateOutletContext]="_getIconContext()"></ng-container>
8-
<mat-icon *ngSwitchDefault>{{_getDefaultIconForState(state)}}</mat-icon>
8+
<ng-container *ngSwitchDefault [ngSwitch]="state">
9+
<span *ngSwitchCase="'number'">{{_getDefaultTextForState(state)}}</span>
10+
<mat-icon *ngSwitchDefault>{{_getDefaultTextForState(state)}}</mat-icon>
11+
</ng-container>
912
</div>
1013
</div>
1114
<div class="mat-step-label"

src/lib/stepper/step-header.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ export class MatStepHeader extends CdkStepHeader implements OnDestroy {
102102
};
103103
}
104104

105-
_getDefaultIconForState(state: StepState): string {
105+
_getDefaultTextForState(state: StepState): string {
106106
if (state == 'number') {
107107
return `${this.index + 1}`;
108108
}

tools/public_api_guard/lib/stepper.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export declare class MatStepHeader extends CdkStepHeader implements OnDestroy {
2929
selected: boolean;
3030
state: StepState;
3131
constructor(_intl: MatStepperIntl, _focusMonitor: FocusMonitor, _elementRef: ElementRef<HTMLElement>, changeDetectorRef: ChangeDetectorRef);
32-
_getDefaultIconForState(state: StepState): string;
32+
_getDefaultTextForState(state: StepState): string;
3333
_getHostElement(): HTMLElement;
3434
_getIconContext(): MatStepperIconContext;
3535
_stringLabel(): string | null;

0 commit comments

Comments
 (0)