Skip to content

Conversation

@willshowell
Copy link
Contributor

Fixes #4476

This may be naive regarding selection change events, but existing tests pass and it fixes the issue.

cc @crisbeto

@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label May 18, 2017
@crisbeto crisbeto self-assigned this May 18, 2017
@crisbeto
Copy link
Member

crisbeto commented May 18, 2017

Off the top of my head, I can't think of anything that it might break, but let me play around with it a bit more tomorrow.

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.

Logic seems fine, just a couple of nitpicks.

throw getMdSelectNonArrayValueError();
}

this._clearSelection();
Copy link
Member

Choose a reason for hiding this comment

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

nit: Can you add a new line after this one?


options =
overlayContainerElement.querySelectorAll('md-option') as NodeListOf<HTMLElement>;
expect(options[0].classList).not.toContain('mat-selected');
Copy link
Member

Choose a reason for hiding this comment

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

Could you add a description to the expectations in the test? It makes it easier to parse if one of them fails. E.g. expect(options[0].classList).not.toContain('mat-selected', 'Expected first option not to be selected');.

@willshowell
Copy link
Contributor Author

@crisbeto changes have been made

@crisbeto
Copy link
Member

Seems like there are a couple of linter errors. The Closure failure should be fixed by #4709.

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, I'll defer adding the merge-ready label until #4662 and #4709 are merged, which should fix the test failures.

@crisbeto crisbeto added pr: lgtm blocked This issue is blocked by some external factor, such as a prerequisite PR and removed pr: needs review labels May 22, 2017
@crisbeto
Copy link
Member

@willshowell the two PRs got merged. Can you rebase from master?

@willshowell willshowell force-pushed the fix/select-option-styling branch from 2cadd47 to 885db05 Compare May 22, 2017 16:57
@crisbeto crisbeto added action: merge The PR is ready for merge by the caretaker and removed blocked This issue is blocked by some external factor, such as a prerequisite PR labels May 22, 2017
@tinayuangao tinayuangao merged commit db72b06 into angular:master May 23, 2017
@willshowell willshowell deleted the fix/select-option-styling branch May 23, 2017 20:58
@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 6, 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.

Select option styling bug

4 participants