-
Notifications
You must be signed in to change notification settings - Fork 6.8k
feat(stepper): Add support for linear stepper #6116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
74b24ce
5d78514
5e57f17
1acfef4
71cb69f
e648c0e
d8b53ef
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,11 +55,9 @@ export class MdStep extends CdkStep implements ErrorOptions { | |
errorStateMatcher = (control: FormControl, form: FormGroupDirective | NgForm) => { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does it work if this is a prototype method rather than a property? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No because the |
||
let originalErrorState = this._originalErrorStateMatcher(control, form); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you add a comment that explains the background for why we are doing this custom error matcher stuff? (i.e., everything we talked about in the meeting) |
||
|
||
/** | ||
* Custom error state checks for the validity of form that is not submitted or touched | ||
* since user can trigger a form change by calling for another step without directly | ||
* interacting with the current form. | ||
*/ | ||
// Custom error state checks for the validity of form that is not submitted or touched | ||
// since user can trigger a form change by calling for another step without directly | ||
// interacting with the current form. | ||
let customErrorState = control.invalid && this.interacted; | ||
|
||
return originalErrorState || customErrorState; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The class should
implement ErrorOptions