@@ -11,6 +11,7 @@ import {
11
11
import { Focusable } from '../core/a11y/focus-key-manager' ;
12
12
import { coerceBooleanProperty } from '../core/coercion/boolean-property' ;
13
13
import { CanColor , mixinColor } from '../core/common-behaviors/color' ;
14
+ import { CanDisable , mixinDisabled } from '../core/common-behaviors/disabled' ;
14
15
15
16
export interface MdChipEvent {
16
17
chip : MdChip ;
@@ -20,7 +21,7 @@ export interface MdChipEvent {
20
21
export class MdChipBase {
21
22
constructor ( public _renderer : Renderer2 , public _elementRef : ElementRef ) { }
22
23
}
23
- export const _MdChipMixinBase = mixinColor ( MdChipBase , 'primary' ) ;
24
+ export const _MdChipMixinBase = mixinColor ( mixinDisabled ( MdChipBase ) , 'primary' ) ;
24
25
25
26
26
27
/**
@@ -39,7 +40,7 @@ export class MdBasicChip { }
39
40
@Directive ( {
40
41
selector : `md-basic-chip, [md-basic-chip], md-chip, [md-chip],
41
42
mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]` ,
42
- inputs : [ 'color' ] ,
43
+ inputs : [ 'color' , 'disabled' ] ,
43
44
host : {
44
45
'class' : 'mat-chip' ,
45
46
'tabindex' : '-1' ,
@@ -52,11 +53,7 @@ export class MdBasicChip { }
52
53
'(blur)' : '_hasFocus = false' ,
53
54
}
54
55
} )
55
- export class MdChip extends _MdChipMixinBase implements Focusable , OnDestroy , CanColor {
56
- /** Whether or not the chip is disabled. */
57
- @Input ( ) get disabled ( ) : boolean { return this . _disabled ; }
58
- set disabled ( value : boolean ) { this . _disabled = coerceBooleanProperty ( value ) ; }
59
- protected _disabled : boolean = null ;
56
+ export class MdChip extends _MdChipMixinBase implements Focusable , OnDestroy , CanColor , CanDisable {
60
57
61
58
/** Whether the chip is selected. */
62
59
@Input ( ) get selected ( ) : boolean { return this . _selected ; }
0 commit comments