You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fr(MatStepper): No notification mechanism on step interacted without a step change. #19918
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
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.
changed the title [-]bug(MatStepper): No notification mechanism on step `interacted` without a step change.[/-][+]fr(MatStepper): No notification mechanism on step `interacted` without a step change.[/+]on Jul 10, 2020
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
Activity
jelbourn commentedon Jul 9, 2020
@paulferaud would you be able to create a reproduction in StackBlitz that demonstrates the issue?
paulferaud commentedon Jul 10, 2020
Sure. Here: https://stackblitz.com/edit/angular-adnhub
I’m not entirely sure what the “expected” behavior needs to be. The issue is my nested component has no way of being notified of the change:
matStepperNextbutton triggers from submit, which is an event the nested component can listen to: https://screencast.googleplex.com/cast/NTA3NDg2OTQyOTQ2OTE4NHw2ZmM1YjcyNS01Mg(Sorry about internal videos. Not sure how else to easily share)
Would there be any easy to make
MatStepper’snext()method somehow submit the form that is configured on thatMatStep?The alternative might also be to also monitor
selectionChangeevents, eg:But that breaks down because in this case, since no event is actually fired. Essentially nothing is fired.
[-]bug(MatStepper): No notification mechanism on step `interacted` without a step change.[/-][+]fr(MatStepper): No notification mechanism on step `interacted` without a step change.[/+]feat(cdk/stepper): emit event when the user interacts with a step
feat(cdk/stepper): emit event when the user interacts with a step
feat(cdk/stepper): emit event when the user interacts with a step
feat(cdk/stepper): emit event when the user interacts with a step
feat(cdk/stepper): emit event when the user interacts with a step
feat(cdk/stepper): emit event when the user interacts with a step (#2…
angular-automatic-lock-bot commentedon May 14, 2021
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.