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

Commit 5e22256

Browse files
devversionThomasBurleson
authored andcommitted
feat(autocomplete): allow select on match to be case insensitive.
Fixes #5782 Closes #6935
1 parent 321feb0 commit 5e22256

File tree

1 file changed

+22
-19
lines changed

1 file changed

+22
-19
lines changed

src/components/autocomplete/js/autocompleteDirective.js

Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ angular
6565
* @param {number=} md-input-maxlength The maximum length for the input's value for validation
6666
* @param {boolean=} md-select-on-match When set, autocomplete will automatically select exact
6767
* the item if the search text is an exact match
68+
* @param {boolean=} md-match-case-insensitive When set and using `md-select-on-match`, autocomplete
69+
* will select on case-insensitive match
6870
*
6971
* @usage
7072
* ### Basic Example
@@ -127,25 +129,26 @@ function MdAutocomplete () {
127129
controller: 'MdAutocompleteCtrl',
128130
controllerAs: '$mdAutocompleteCtrl',
129131
scope: {
130-
inputName: '@mdInputName',
131-
inputMinlength: '@mdInputMinlength',
132-
inputMaxlength: '@mdInputMaxlength',
133-
searchText: '=?mdSearchText',
134-
selectedItem: '=?mdSelectedItem',
135-
itemsExpr: '@mdItems',
136-
itemText: '&mdItemText',
137-
placeholder: '@placeholder',
138-
noCache: '=?mdNoCache',
139-
selectOnMatch: '=?mdSelectOnMatch',
140-
itemChange: '&?mdSelectedItemChange',
141-
textChange: '&?mdSearchTextChange',
142-
minLength: '=?mdMinLength',
143-
delay: '=?mdDelay',
144-
autofocus: '=?mdAutofocus',
145-
floatingLabel: '@?mdFloatingLabel',
146-
autoselect: '=?mdAutoselect',
147-
menuClass: '@?mdMenuClass',
148-
inputId: '@?mdInputId'
132+
inputName: '@mdInputName',
133+
inputMinlength: '@mdInputMinlength',
134+
inputMaxlength: '@mdInputMaxlength',
135+
searchText: '=?mdSearchText',
136+
selectedItem: '=?mdSelectedItem',
137+
itemsExpr: '@mdItems',
138+
itemText: '&mdItemText',
139+
placeholder: '@placeholder',
140+
noCache: '=?mdNoCache',
141+
selectOnMatch: '=?mdSelectOnMatch',
142+
matchInsensitive: '=?mdMatchCaseInsensitive',
143+
itemChange: '&?mdSelectedItemChange',
144+
textChange: '&?mdSearchTextChange',
145+
minLength: '=?mdMinLength',
146+
delay: '=?mdDelay',
147+
autofocus: '=?mdAutofocus',
148+
floatingLabel: '@?mdFloatingLabel',
149+
autoselect: '=?mdAutoselect',
150+
menuClass: '@?mdMenuClass',
151+
inputId: '@?mdInputId'
149152
},
150153
link: function(scope, element, attrs, controller) {
151154
// Retrieve the state of using a md-not-found template by using our attribute, which will

0 commit comments

Comments
 (0)