@@ -184,7 +184,7 @@ export class MatSelectTrigger {}
184
184
exportAs : 'matSelect' ,
185
185
templateUrl : 'select.html' ,
186
186
styleUrls : [ 'select.css' ] ,
187
- inputs : [ 'disabled' , 'disableRipple' , 'tabIndex' ] ,
187
+ inputs : [ 'disabled' , 'disableRipple' , 'tabIndex' , 'disbaleOffset' ] ,
188
188
encapsulation : ViewEncapsulation . None ,
189
189
preserveWhitespaces : false ,
190
190
changeDetection : ChangeDetectionStrategy . OnPush ,
@@ -359,6 +359,9 @@ export class MatSelect extends _MatSelectMixinBase implements AfterContentInit,
359
359
360
360
this . _multiple = coerceBooleanProperty ( value ) ;
361
361
}
362
+
363
+ /** Whether the user wants to disable the offset. */
364
+ @Input ( ) disableOffset : string = "" ;
362
365
363
366
/**
364
367
* A function to compare the option values with the selected values. The first argument
@@ -1120,7 +1123,7 @@ export class MatSelect extends _MatSelectMixinBase implements AfterContentInit,
1120
1123
let optionOffsetFromPanelTop : number ;
1121
1124
1122
1125
// Disable offset for smaller lists by returning 0 as value to offset
1123
- if ( this . _getItemCount ( ) <= maxOptionsDisplayed ) {
1126
+ if ( this . disableOffset == 'true' ) {
1124
1127
return 0 ;
1125
1128
}
1126
1129
0 commit comments