components icon indicating copy to clipboard operation
components copied to clipboard

mat-stepper [optional] not working / broken

Open ztgluis opened this issue 8 years ago • 1 comments

Bug: Setting a step to Optional is not working correctly when containing a form with validators

What is the expected behavior?

Should be able to continue through a optional step if a form is not completed but set as optional.

What is the current behavior?

Can't continue past an optional step without filling the form.

What are the steps to reproduce?

  • Create a linear mat-stepper
  • Create a mat-step with property [optional] and assign a [stepControl] form
  • Create a form with a [formControl] and include a validator such as 'required'
  • Attempt to continue through this optional step without touching the form
  • Result: Can't continue through the optional step Stackblitz here: https://stackblitz.com/edit/angular-material2-issue-rrtzza?file=app%2Fapp.component.html

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

Version 5.0.1 of Material was working as described/expected, upgrading to 5.0.3 breaks this functionality rendering the 'optional' property useless.

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

Tested on Angular 5.1.3, Material 5.0.3

Is there anything else we should know?

Worked as expected in Material 5.0.1 I believe the issue was introduces by this PR: https://github.com/angular/material2/pull/8646

ztgluis avatar Jan 04 '18 22:01 ztgluis

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.