Skip to content

bug(Stepper): interacted event object should contain index of step which is clicked. #27199

Open
@crohit7

Description

@crohit7

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

No response

Description

The interacted event should emit new index to detect whether stepper is going to next step or previous step.
The new Index variable is there in code but it is local variable. It should be global variable to be emitted in the event.
It will be helpful to detect whether stepper is going forward or backward by comparing newIndex and selectedIndex.
Or it will be helpful if you provide a property in event object which will determine whether the stepper is going forward or backward.

Reproduction

Steps to reproduce:

  1. Interact with steps by clicking on it.
  2. The interacted event object contains only selectedIndex in interactedStream._stepper.selectedIndex

Expected Behavior

The interacted event object should contain index of step which is clicked.

Actual Behavior

The interacted event object does not contain index of step which is clicked.

Environment

  • Angular: 14.0.7
  • CDK/Material: 14.1.0
  • Browser(s): Chrome: 113.0.5672.127
  • Operating System (e.g. Windows, macOS, Ubuntu): Windows 10

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/stepper

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions