Skip to content

Stepper should provide an click event for step changes #22416

Open
@gobi004

Description

@gobi004

Bug, feature request, or proposal:
Feature request

What is the expected behavior?
Add an click event that gets triggered when the step is clicked in the stepper component

What is the current behavior?
There's no such event.

What are the steps to reproduce?
NA

What is the use-case or motivation for changing an existing behavior?
We have some business logic that we need to save at each step. We have to show the message on click of step "Are you confirm?", we implemented with button click but unable to do in step click, and it's moving forward to next step on clicking of step.

Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Angular 9+
Angular material 11.2

Is there anything else we should know?
Tried to use selectionChange event, no use.its working after the click event. i want to show or prevent before the change event.

<mat-horizontal-stepper (selectionChange)="selectionChange($event)">
<mat-step (click)="alert()">

needs to add click event on step like above. As of there is no option like that

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: cdk/stepperfeatureThis issue represents a new feature or feature request rather than a bug or bug fix

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions