5
5
* Use of this source code is governed by an MIT-style license that can be
6
6
* found in the LICENSE file at https://angular.io/license
7
7
*/
8
-
9
8
import { ActiveDescendantKeyManager } from '@angular/cdk/a11y' ;
10
9
import { Directionality } from '@angular/cdk/bidi' ;
11
10
import { coerceBooleanProperty } from '@angular/cdk/coercion' ;
@@ -69,6 +68,8 @@ import {
69
68
mixinDisabled ,
70
69
mixinTabIndex ,
71
70
MAT_OPTION_PARENT_COMPONENT ,
71
+ mixinDisableRipple ,
72
+ CanDisableRipple ,
72
73
} from '@angular/material/core' ;
73
74
import { MatFormField , MatFormFieldControl } from '@angular/material/form-field' ;
74
75
import { Observable } from 'rxjs/Observable' ;
@@ -153,7 +154,8 @@ export class MatSelectBase {
153
154
public _parentFormGroup : FormGroupDirective ,
154
155
public ngControl : NgControl ) { }
155
156
}
156
- export const _MatSelectMixinBase = mixinTabIndex ( mixinDisabled ( mixinErrorState ( MatSelectBase ) ) ) ;
157
+ export const _MatSelectMixinBase = mixinDisableRipple (
158
+ mixinTabIndex ( mixinDisabled ( mixinErrorState ( MatSelectBase ) ) ) ) ;
157
159
158
160
159
161
/**
@@ -171,7 +173,7 @@ export class MatSelectTrigger {}
171
173
exportAs : 'matSelect' ,
172
174
templateUrl : 'select.html' ,
173
175
styleUrls : [ 'select.css' ] ,
174
- inputs : [ 'disabled' , 'tabIndex' ] ,
176
+ inputs : [ 'disabled' , 'disableRipple' , ' tabIndex'] ,
175
177
encapsulation : ViewEncapsulation . None ,
176
178
preserveWhitespaces : false ,
177
179
changeDetection : ChangeDetectionStrategy . OnPush ,
@@ -207,7 +209,7 @@ export class MatSelectTrigger {}
207
209
} )
208
210
export class MatSelect extends _MatSelectMixinBase implements AfterContentInit , OnChanges ,
209
211
OnDestroy , OnInit , DoCheck , ControlValueAccessor , CanDisable , HasTabIndex ,
210
- MatFormFieldControl < any > , CanUpdateErrorState {
212
+ MatFormFieldControl < any > , CanUpdateErrorState , CanDisableRipple {
211
213
/** Whether or not the overlay panel is open. */
212
214
private _panelOpen = false ;
213
215
@@ -376,14 +378,6 @@ export class MatSelect extends _MatSelectMixinBase implements AfterContentInit,
376
378
}
377
379
private _value : any ;
378
380
379
- /** Whether ripples for all options in the select are disabled. */
380
- @Input ( )
381
- get disableRipple ( ) : boolean { return this . _disableRipple ; }
382
- set disableRipple ( value : boolean ) {
383
- this . _disableRipple = coerceBooleanProperty ( value ) ;
384
- }
385
- private _disableRipple : boolean = false ;
386
-
387
381
/** Aria label of the select. If not specified, the placeholder will be used as label. */
388
382
@Input ( 'aria-label' ) ariaLabel : string = '' ;
389
383
0 commit comments