angular / angular/components

feat(stepper): Make `CdkStepper` generic to support extended CdkStep

Open
#22,590 3 comments 4 reactions 0 assignees View on GitHub
area: cdk/stepper feature needs: discussion P4
Dominant language
TypeScript
Stars
25k
Forks
6.8k
Avg merge
1d 8h
Merged PRs (30d)
91

Description

#### Feature Description

Currently, when I want to use `CdkStepper` with a custom class for a step (extension of a class `CdkStep`, e.g. `MyStep extends CdkStep`), I am not able to as `CdkStepper` is not generic and is fixed to `CdkStep` class for a step. I would like to make `CdkStepper` generic, so I can use `CdkStepper`.

#### Use Case

Let's say I have a class`OnboardingStepComponent extends CdkStep` which has the property `specialLabel`. I want to use the CdkStepper with this specialized step component.

Let me know if this sounds reasonable, if so, I can work on this.

Contributor guide

Open the contributing guide

Research direction

Start by locating the CdkStepper and CdkStep entry points in the Angular components repository and inspect how the step type is currently fixed. Confirm the desired behavior with a specialized MyStep or OnboardingStepComponent, then add coverage showing that CdkStepper supports an extended step with specialLabel.

Written by the indexing model from the issue text.

Assessment

Tech stack
angular, typescript
Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.