angular / angular/components

MatStepper treats steps as `interacted` if you immediately return to a previous step

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

Description

#### Bug, feature request, or proposal:

Bug

#### What is the expected behavior?

Angular-material forms should be presented in a non-error state when the conditions of the default ErrorStateMatcher are not met (not touched or not submitted)

#### What is the current behavior?

When a form is presented inside a mat-stepper, when traversing to a previous step, the form will be in an error state even if the form is pristine and un-submitted. Any attempt to try to reset the form or FormGroupDirective fails.

#### What are the steps to reproduce?

https://stackblitz.com/edit/angular-material2-issue-fay224

#### What is the use-case or motivation for changing an existing behavior?

#### Which versions of Angular, Material, OS, TypeScript, browsers are affected?

#### Is there anything else we should know?

Contributor guide

Open the contributing guide

Research direction

Start with the linked StackBlitz reproduction and trace the MatStepper interaction with the form and default ErrorStateMatcher when returning to a previous step. Done means a pristine, unsubmitted form remains non-error when revisiting a step, and resetting the form or FormGroupDirective works as expected.

Written by the indexing model from the issue text.

Assessment

Tech stack
angular, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 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.