Skip to content

Commit a8eae00

Browse files
committed
change cell query to static true
1 parent d80a356 commit a8eae00

File tree

1 file changed

+17
-14
lines changed

1 file changed

+17
-14
lines changed

src/cdk/table/cell.ts

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export interface CellDef {
2222
*/
2323
@Directive({selector: '[cdkCellDef]'})
2424
export class CdkCellDef implements CellDef {
25-
constructor(/** @docs-private */ public template: TemplateRef<any>) { }
25+
constructor(/** @docs-private */ public template: TemplateRef<any>) {}
2626
}
2727

2828
/**
@@ -31,7 +31,7 @@ export class CdkCellDef implements CellDef {
3131
*/
3232
@Directive({selector: '[cdkHeaderCellDef]'})
3333
export class CdkHeaderCellDef implements CellDef {
34-
constructor(/** @docs-private */ public template: TemplateRef<any>) { }
34+
constructor(/** @docs-private */ public template: TemplateRef<any>) {}
3535
}
3636

3737
/**
@@ -40,13 +40,13 @@ export class CdkHeaderCellDef implements CellDef {
4040
*/
4141
@Directive({selector: '[cdkFooterCellDef]'})
4242
export class CdkFooterCellDef implements CellDef {
43-
constructor(/** @docs-private */ public template: TemplateRef<any>) { }
43+
constructor(/** @docs-private */ public template: TemplateRef<any>) {}
4444
}
4545

4646
// Boilerplate for applying mixins to CdkColumnDef.
4747
/** @docs-private */
4848
export class CdkColumnDefBase {}
49-
export const _CdkColumnDefBase: CanStickCtor & typeof CdkColumnDefBase =
49+
export const _CdkColumnDefBase: CanStickCtor&typeof CdkColumnDefBase =
5050
mixinHasStickyInput(CdkColumnDefBase);
5151

5252
/**
@@ -56,19 +56,20 @@ export const _CdkColumnDefBase: CanStickCtor & typeof CdkColumnDefBase =
5656
@Directive({
5757
selector: '[cdkColumnDef]',
5858
inputs: ['sticky'],
59-
providers: [{
60-
provide: 'MAT_SORT_HEADER_COLUMN_DEF',
61-
useExisting: CdkColumnDef
62-
}],
59+
providers: [{provide: 'MAT_SORT_HEADER_COLUMN_DEF', useExisting: CdkColumnDef}],
6360
})
6461
export class CdkColumnDef extends _CdkColumnDefBase implements CanStick {
6562
/** Unique name for this column. */
6663
@Input('cdkColumnDef')
67-
get name(): string { return this._name; }
64+
get name(): string {
65+
return this._name;
66+
}
6867
set name(name: string) {
6968
// If the directive is set without a name (updated programatically), then this setter will
7069
// trigger with an empty string and should not overwrite the programatically set value.
71-
if (!name) { return; }
70+
if (!name) {
71+
return;
72+
}
7273

7374
this._name = name;
7475
this.cssClassFriendlyName = name.replace(/[^a-z0-9_-]/ig, '-');
@@ -81,7 +82,9 @@ export class CdkColumnDef extends _CdkColumnDefBase implements CanStick {
8182
* has been changed.
8283
*/
8384
@Input('stickyEnd')
84-
get stickyEnd(): boolean { return this._stickyEnd; }
85+
get stickyEnd(): boolean {
86+
return this._stickyEnd;
87+
}
8588
set stickyEnd(v: boolean) {
8689
const prevValue = this._stickyEnd;
8790
this._stickyEnd = coerceBooleanProperty(v);
@@ -90,13 +93,13 @@ export class CdkColumnDef extends _CdkColumnDefBase implements CanStick {
9093
_stickyEnd: boolean = false;
9194

9295
/** @docs-private */
93-
@ContentChild(CdkCellDef, {static: false}) cell: CdkCellDef;
96+
@ContentChild(CdkCellDef, {static: true}) cell: CdkCellDef;
9497

9598
/** @docs-private */
96-
@ContentChild(CdkHeaderCellDef, {static: false}) headerCell: CdkHeaderCellDef;
99+
@ContentChild(CdkHeaderCellDef, {static: true}) headerCell: CdkHeaderCellDef;
97100

98101
/** @docs-private */
99-
@ContentChild(CdkFooterCellDef, {static: false}) footerCell: CdkFooterCellDef;
102+
@ContentChild(CdkFooterCellDef, {static: true}) footerCell: CdkFooterCellDef;
100103

101104
/**
102105
* Transformed version of the column name that can be used as part of a CSS classname. Excludes

0 commit comments

Comments
 (0)