@@ -30,10 +30,15 @@ import {Subscription} from 'rxjs/Subscription';
30
30
import { SPACE } from '../core/keyboard/keycodes' ;
31
31
import { Focusable } from '../core/a11y/focus-key-manager' ;
32
32
import { MdListOption } from './list-option' ;
33
+ import { CanDisable , mixinDisabled } from '../core/common-behaviors/disabled' ;
34
+
35
+ export class MdSelectionListBase { }
36
+ export const _MdSelectionListMixinBase = mixinDisabled ( MdSelectionListBase ) ;
33
37
34
38
@Component ( {
35
39
moduleId : module . id ,
36
40
selector : 'md-selection-list, mat-selection-list' ,
41
+ inputs : [ 'disabled' ] ,
37
42
host : {
38
43
'role' : 'listbox' ,
39
44
'[attr.tabindex]' : '_tabIndex' ,
@@ -46,11 +51,10 @@ import {MdListOption} from './list-option';
46
51
encapsulation : ViewEncapsulation . None ,
47
52
changeDetection : ChangeDetectionStrategy . OnPush
48
53
} )
49
- export class MdSelectionList implements AfterContentInit , OnDestroy {
54
+ export class MdSelectionList extends _MdSelectionListMixinBase
55
+ implements Focusable , CanDisable , AfterContentInit , OnDestroy {
50
56
private _disableRipple : boolean = false ;
51
57
52
- private _disabled : boolean = false ;
53
-
54
58
/** Tab index for the selection-list. */
55
59
_tabIndex = 0 ;
56
60
@@ -83,12 +87,9 @@ export class MdSelectionList implements AfterContentInit, OnDestroy {
83
87
get disableRipple ( ) { return this . _disableRipple ; }
84
88
set disableRipple ( value : boolean ) { this . _disableRipple = coerceBooleanProperty ( value ) ; }
85
89
86
- /** Whether the selection-list is disabled */
87
- @Input ( )
88
- get disabled ( ) { return this . _disabled ; }
89
- set disabled ( value : any ) { this . _disabled = coerceBooleanProperty ( value ) ; }
90
-
91
- constructor ( private _element : ElementRef ) { }
90
+ constructor ( private _element : ElementRef ) {
91
+ super ( ) ;
92
+ }
92
93
93
94
ngAfterContentInit ( ) : void {
94
95
this . _keyManager = new FocusKeyManager ( this . options ) . withWrap ( ) ;
0 commit comments