Skip to content

fr(MatStepper): No notification mechanism on step interacted without a step change. #19918

@paulferaud

Description

@paulferaud

Reproduction

  • Given a linear stepper, with steps associated to forms.
  • Have step 1 with an invalid state (which would prevent navigating to step 2)
  • Click on header 2.

Expected Behavior

A SelectionChange event to be fired, saying step 1 was selected (from step 1 before, yes)

Actual Behavior

Nothing happened

Why

By clicking on the next step, but being denied, then the step is marked as “interacted”, which causes the formFields’s errorStateMatcher start emitting true, making field “red”. This is nice user experience.

HOWEVER, my Steps are actually implemented by components, and they have ChangeDetectionStrategy.OnPush. The issue I have is I have NO WAY to notify my component of the event, and tell it to refresh it’s form’s states.

Might be related to #18080

Environment

  • Angular: 10.0.1

Metadata

Metadata

Assignees

Labels

GThis is is related to a Google internal issueP3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: cdk/stepperfeatureLabel used to distinguish feature request from other issues

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions