Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

feat(autocomplete): adds a new attribute option md-select-on-match #3825

Closed
wants to merge 1 commit into from

Conversation

robertmesserle
Copy link
Contributor

When enabled, an exact match in the searchText will automatically
select a matching item if (a) there is exactly one match found and (b)
the searchText matches the display value exactly

Closes #3324

@robertmesserle robertmesserle force-pushed the issues/3324 branch 2 times, most recently from 95bcbed to 3b322ff Compare July 20, 2015 17:40
@robertmesserle
Copy link
Contributor Author

This PR also cleans up the spec code for older tests to remove unnecessary steps based on the current implementation.

@@ -593,4 +594,13 @@ function MdAutocompleteCtrl ($scope, $element, $mdUtil, $mdConstant, $mdTheming,
if (hasFocus) ctrl.hidden = shouldHide();
}

function selectItemOnMatch () {
Copy link
Contributor

Choose a reason for hiding this comment

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

Need function docs

@ThomasBurleson
Copy link
Contributor

@robertmesserle - my comments aside, looks good to me.

When enabled, an exact match in the `searchText` will automatically
select a matching item if (a) there is exactly one match found and (b)
the `searchText` matches the display value exactly

Closes #3324
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 this pull request may close these issues.

2 participants