@@ -74,7 +74,6 @@ angular
74
74
* </hljs>
75
75
*
76
76
*
77
- *
78
77
* @param {expression } md-items An expression in the format of `item in results` to iterate over
79
78
* matches for your search.<br/><br/>
80
79
* The `results` expression can be also a function, which returns the results synchronously
@@ -102,12 +101,11 @@ angular
102
101
* @param {boolean= } md-no-asterisk When present, asterisk will not be appended to the floating label.
103
102
* @param {boolean= } md-autoselect If set to true, the first item will be automatically selected
104
103
* in the dropdown upon open.
105
- * @param {string= } md-menu-class This will be applied to the dropdown menu for styling.
106
- * @param {string= } md-floating-label This will add a floating label to autocomplete and wrap it in
107
- * `md-input-container`.
108
104
* @param {string= } md-input-name The name attribute given to the input element to be used with
109
105
* FormController.
110
- * @param {string= } md-menu-class This will be applied to the dropdown menu for styling
106
+ * @param {string= } md-menu-class This class will be applied to the dropdown menu for styling.
107
+ * @param {string= } md-menu-container-class This class will be applied to the parent container
108
+ * of the dropdown panel.
111
109
* @param {string= } md-input-class This will be applied to the input for styling. This attribute is only valid when a `md-floating-label` is defined
112
110
* @param {string= } md-floating-label This will add a floating label to autocomplete and wrap it in
113
111
* `md-input-container`
@@ -229,39 +227,39 @@ angular
229
227
* </hljs>
230
228
*
231
229
*/
232
-
233
230
function MdAutocomplete ( $$mdSvgRegistry ) {
234
231
235
232
return {
236
233
controller : 'MdAutocompleteCtrl' ,
237
234
controllerAs : '$mdAutocompleteCtrl' ,
238
235
scope : {
239
- inputName : '@mdInputName' ,
240
- inputMinlength : '@mdInputMinlength' ,
241
- inputMaxlength : '@mdInputMaxlength' ,
242
- searchText : '=?mdSearchText' ,
243
- selectedItem : '=?mdSelectedItem' ,
244
- itemsExpr : '@mdItems' ,
245
- itemText : '&mdItemText' ,
246
- placeholder : '@placeholder' ,
247
- noCache : '=?mdNoCache' ,
248
- requireMatch : '=?mdRequireMatch' ,
249
- selectOnMatch : '=?mdSelectOnMatch' ,
250
- matchInsensitive : '=?mdMatchCaseInsensitive' ,
251
- itemChange : '&?mdSelectedItemChange' ,
252
- textChange : '&?mdSearchTextChange' ,
253
- minLength : '=?mdMinLength' ,
254
- delay : '=?mdDelay' ,
255
- autofocus : '=?mdAutofocus' ,
256
- floatingLabel : '@?mdFloatingLabel' ,
257
- autoselect : '=?mdAutoselect' ,
258
- menuClass : '@?mdMenuClass' ,
259
- inputClass : '@?mdInputClass' ,
260
- inputId : '@?mdInputId' ,
261
- escapeOptions : '@?mdEscapeOptions' ,
262
- dropdownItems : '=?mdDropdownItems' ,
263
- dropdownPosition : '@?mdDropdownPosition' ,
264
- clearButton : '=?mdClearButton'
236
+ inputName : '@mdInputName' ,
237
+ inputMinlength : '@mdInputMinlength' ,
238
+ inputMaxlength : '@mdInputMaxlength' ,
239
+ searchText : '=?mdSearchText' ,
240
+ selectedItem : '=?mdSelectedItem' ,
241
+ itemsExpr : '@mdItems' ,
242
+ itemText : '&mdItemText' ,
243
+ placeholder : '@placeholder' ,
244
+ noCache : '=?mdNoCache' ,
245
+ requireMatch : '=?mdRequireMatch' ,
246
+ selectOnMatch : '=?mdSelectOnMatch' ,
247
+ matchInsensitive : '=?mdMatchCaseInsensitive' ,
248
+ itemChange : '&?mdSelectedItemChange' ,
249
+ textChange : '&?mdSearchTextChange' ,
250
+ minLength : '=?mdMinLength' ,
251
+ delay : '=?mdDelay' ,
252
+ autofocus : '=?mdAutofocus' ,
253
+ floatingLabel : '@?mdFloatingLabel' ,
254
+ autoselect : '=?mdAutoselect' ,
255
+ menuClass : '@?mdMenuClass' ,
256
+ menuContainerClass : '@?mdMenuContainerClass' ,
257
+ inputClass : '@?mdInputClass' ,
258
+ inputId : '@?mdInputId' ,
259
+ escapeOptions : '@?mdEscapeOptions' ,
260
+ dropdownItems : '=?mdDropdownItems' ,
261
+ dropdownPosition : '@?mdDropdownPosition' ,
262
+ clearButton : '=?mdClearButton'
265
263
} ,
266
264
compile : function ( tElement , tAttrs ) {
267
265
var attributes = [ 'md-select-on-focus' , 'md-no-asterisk' , 'ng-trim' , 'ng-pattern' ] ;
@@ -291,6 +289,7 @@ function MdAutocomplete ($$mdSvgRegistry) {
291
289
itemTemplate = getItemTemplate ( ) ,
292
290
leftover = element . html ( ) ,
293
291
tabindex = attr . tabindex ;
292
+ var menuContainerClass = attr . mdMenuContainerClass ? ' ' + attr . mdMenuContainerClass : '' ;
294
293
295
294
// Set our attribute for the link function above which runs later.
296
295
// We will set an attribute, because otherwise the stored variables will be trashed when
@@ -319,7 +318,7 @@ function MdAutocomplete ($$mdSvgRegistry) {
319
318
ng-mouseleave="$mdAutocompleteCtrl.listLeave()"\
320
319
ng-mouseup="$mdAutocompleteCtrl.mouseUp()"\
321
320
ng-hide="$mdAutocompleteCtrl.hidden"\
322
- class="md-autocomplete-suggestions-container md-whiteframe-z1"\
321
+ class="md-autocomplete-suggestions-container md-whiteframe-z1' + menuContainerClass + ' "\
323
322
ng-class="{ \'md-not-found\': $mdAutocompleteCtrl.notFoundVisible() }"\
324
323
role="presentation">\
325
324
<ul class="md-autocomplete-suggestions"\
0 commit comments