Skip to content

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

@willshowell

Description

@willshowell

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions