Skip to content

Conversation

mmalerba
Copy link
Contributor

@mmalerba mmalerba commented Feb 20, 2018

fixes #8667

@mmalerba mmalerba requested a review from crisbeto February 20, 2018 19:19
@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Feb 20, 2018
Copy link
Member

@crisbeto crisbeto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, only a couple of nits.

@@ -349,7 +349,9 @@ export class CdkStepper implements OnDestroy {
if (this._linear && index >= 0) {
return steps.slice(0, index).some(step => {
const control = step.stepControl;
const isIncomplete = control ? (control.invalid || control.pending) : !step.completed;
const isIncomplete = control ?
(control.invalid || control.pending) || !step.interacted :
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should be able to have the parentheses around the !step.interacted. I added the one around the control one so they're easier to distinguish inside the ternary.

expect(stepper.selectedIndex).toBe(0);

stepper.selectedIndex = 1;
fixture.detectChanges();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add an assertion after this one as well?

@crisbeto crisbeto added pr: lgtm action: merge The PR is ready for merge by the caretaker and removed pr: needs review labels Feb 20, 2018
@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes PR author has agreed to Google's Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Linear stepper: already valid steps can be skipped without visit
4 participants