9
9
import {
10
10
ChangeDetectionStrategy ,
11
11
Component ,
12
- Directive , IterableChanges ,
12
+ Directive ,
13
+ IterableChanges ,
13
14
IterableDiffer ,
14
15
IterableDiffers ,
15
16
SimpleChanges ,
16
17
TemplateRef ,
17
18
ViewContainerRef
18
19
} from '@angular/core' ;
19
20
import { CdkCellDef } from './cell' ;
20
- import { Subject } from 'rxjs/Subject' ;
21
21
22
22
/**
23
23
* The row template that can be used by the md-table. Should not be used outside of the
@@ -34,7 +34,7 @@ export abstract class BaseRowDef {
34
34
columns : string [ ] ;
35
35
36
36
/** Differ used to check if any changes were made to the columns. */
37
- columnsDiffer : IterableDiffer < any > ;
37
+ protected _columnsDiffer : IterableDiffer < any > ;
38
38
39
39
constructor ( public template : TemplateRef < any > ,
40
40
protected _differs : IterableDiffers ) { }
@@ -43,8 +43,8 @@ export abstract class BaseRowDef {
43
43
// Create a new columns differ if one does not yet exist. Initialize it based on initial value
44
44
// of the columns property.
45
45
const columns = changes [ 'columns' ] . currentValue ;
46
- if ( ! this . columnsDiffer && columns ) {
47
- this . columnsDiffer = this . _differs . find ( columns ) . create ( ) ;
46
+ if ( ! this . _columnsDiffer && columns ) {
47
+ this . _columnsDiffer = this . _differs . find ( columns ) . create ( ) ;
48
48
this . _columnsDiffer . diff ( columns ) ;
49
49
}
50
50
}
@@ -54,7 +54,7 @@ export abstract class BaseRowDef {
54
54
* if there is no difference.
55
55
*/
56
56
getColumnsDiff ( ) : IterableChanges < any > | null {
57
- return this . columnsDiffer . diff ( this . columns ) ;
57
+ return this . _columnsDiffer . diff ( this . columns ) ;
58
58
}
59
59
}
60
60
0 commit comments