I am using a material stepper control to implement a multi-step workflow. There are times when I need to set focus to the current step header. The MatStepHeader
directive exposes a focus
method, but I can't find any way to get a reference to the step header directives.
Things I have tried so far:
ViewChildren(MatStepHeader)
- this doesn't return anything.- Add explicit
<mat-step-header></mat-step-header>
markup to the steps - this does not render correctly.
None of the other stepper-related components (e.g., MatStepper
or MatStep
) expose the header. It seems very strange that MatStepHeader
would expose an API if it is not accessible.
Is there any way to get references to the header directives in a stepper?