Skip to content

Conversation

crisbeto
Copy link
Member

@crisbeto crisbeto commented Jan 20, 2018

Adds the ability for the consumer opt-in to having the autocomplete highlight the first option when opened. Includes an injection token that allows it to be configured globally.

Fixes #8423.

@crisbeto crisbeto requested a review from kara as a code owner January 20, 2018 11:29
@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Jan 20, 2018
@crisbeto crisbeto force-pushed the 8423/autocomplete-highlight-first-option branch 3 times, most recently from abc0535 to e2ff050 Compare January 20, 2018 12:42
* Can be configured globally through the `MAT_AUTOCOMPLETE_DEFAULT_OPTIONS` token.
*/
@Input()
get highlightFirstOption(): boolean { return this._highlightFirstOption; }
Copy link
Member

Choose a reason for hiding this comment

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

Chatted w/ Miles and Joey, we came to autoActiveOption as the proposal for this. I like using "active" since it aligns with the term we use in list-key-manager and in datepicker. Thoughts?

…open

Adds the ability for the consumer opt-in to having the autocomplete highlight the first option when opened. Includes an injection token that allows it to be configured globally.

Fixes angular#8423.
@crisbeto crisbeto force-pushed the 8423/autocomplete-highlight-first-option branch from e2ff050 to e758986 Compare January 25, 2018 21:21
@crisbeto
Copy link
Member Author

Good to go @jelbourn.

Copy link
Member

@jelbourn jelbourn left a comment

Choose a reason for hiding this comment

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

LGTM

@jelbourn jelbourn added pr: lgtm action: merge The PR is ready for merge by the caretaker and removed pr: needs review labels Jan 25, 2018
@crisbeto crisbeto added the target: patch This PR is targeted for the next patch release label Jan 26, 2018
@jelbourn jelbourn merged commit b42fcb9 into angular:master Jan 26, 2018
@badre429
Copy link

finally this feature can replace select2 search functionality thanks
can't wait for next release

@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 target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Autocomplete - add option to always treat first option as active
4 participants