Skip to content
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

[autocomplete] conflicting "disabled" and "selected" styles on option hover #6638

Closed
willshowell opened this issue Aug 25, 2017 · 1 comment · Fixed by #6640
Closed

[autocomplete] conflicting "disabled" and "selected" styles on option hover #6638

willshowell opened this issue Aug 25, 2017 · 1 comment · Fixed by #6640
Assignees

Comments

@willshowell
Copy link
Contributor

willshowell commented Aug 25, 2017

Bug, feature request, or proposal:

Style bug

Expected

One of the styles, disabled or selected, should always take precedence.

Current

A selected & disabled autocomplete option will show selected styles until hovered. It then shows the disabled styles.

Reproduction

Shown in autocomplete:
http://plnkr.co/edit/Nbqhx79TpwkqqHhm9HpF?p=preview

Note the different behavior in select:
http://plnkr.co/edit/Z4vDg5v1gcQbsrFToewG?p=preview

Motivation

I have an autocomplete that adds selected options to a unique selection list. Once a selection is made, I clear the autocomplete trigger and disable the option to make it clear that duplicate selections are not allowed. This causes styling issues because the selected option is now also disabled. It's easy to workaround by deselecting options after their selection event fires, but I'm not so sure selected options in autocomplete should have any special styling.

@willshowell willshowell changed the title [option] conflicting "disabled" and "selected" styles on hover [autocomplete] conflicting "disabled" and "selected" styles on option hover Aug 25, 2017
@crisbeto crisbeto self-assigned this Aug 25, 2017
crisbeto added a commit to crisbeto/material2 that referenced this issue Aug 25, 2017
* Fixes a selected and disabled option in the autocomplete not showing as disabled until it is hovered.
* Fixes the disabled and selected options in `md-select` using the theme color, instead of the disabled color.
* Fixes the disabled state of an option not being passed down to its checkbox.

Fixes angular#6638.
jelbourn pushed a commit that referenced this issue Sep 1, 2017
* Fixes a selected and disabled option in the autocomplete not showing as disabled until it is hovered.
* Fixes the disabled and selected options in `md-select` using the theme color, instead of the disabled color.
* Fixes the disabled state of an option not being passed down to its checkbox.

Fixes #6638.
@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 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants