Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(table): add missing constructors #11252

Merged
merged 1 commit into from
May 10, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 19 additions & 4 deletions src/lib/table/cell.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* found in the LICENSE file at https://angular.io/license
*/

import {Directive, ElementRef, Input} from '@angular/core';
import {Directive, ElementRef, Input, TemplateRef} from '@angular/core';
import {
CdkCell,
CdkCellDef,
Expand All @@ -23,7 +23,12 @@ import {
selector: '[matCellDef]',
providers: [{provide: CdkCellDef, useExisting: MatCellDef}]
})
export class MatCellDef extends CdkCellDef { }
export class MatCellDef extends CdkCellDef {
// TODO(andrewseguin): Remove this constructor after compiler-cli is updated; see issue #9329
constructor(/** @docs-private */ public template: TemplateRef<any>) {
super(template);
}
}

/**
* Header cell definition for the mat-table.
Expand All @@ -33,7 +38,12 @@ export class MatCellDef extends CdkCellDef { }
selector: '[matHeaderCellDef]',
providers: [{provide: CdkHeaderCellDef, useExisting: MatHeaderCellDef}]
})
export class MatHeaderCellDef extends CdkHeaderCellDef { }
export class MatHeaderCellDef extends CdkHeaderCellDef {
// TODO(andrewseguin): Remove this constructor after compiler-cli is updated; see issue #9329
constructor(/** @docs-private */ public template: TemplateRef<any>) {
super(template);
}
}

/**
* Footer cell definition for the mat-table.
Expand All @@ -43,7 +53,12 @@ export class MatHeaderCellDef extends CdkHeaderCellDef { }
selector: '[matFooterCellDef]',
providers: [{provide: CdkFooterCellDef, useExisting: MatFooterCellDef}]
})
export class MatFooterCellDef extends CdkFooterCellDef { }
export class MatFooterCellDef extends CdkFooterCellDef {
// TODO(andrewseguin): Remove this constructor after compiler-cli is updated; see issue #9329
constructor(/** @docs-private */ public template: TemplateRef<any>) {
super(template);
}
}

/**
* Column definition for the mat-table.
Expand Down
26 changes: 23 additions & 3 deletions src/lib/table/row.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,13 @@
* found in the LICENSE file at https://angular.io/license
*/

import {ChangeDetectionStrategy, Component, Directive, ViewEncapsulation} from '@angular/core';
import {
ChangeDetectionStrategy,
Component,
Directive,
IterableDiffers, TemplateRef,
ViewEncapsulation
} from '@angular/core';
import {
CDK_ROW_TEMPLATE, CdkFooterRow, CdkFooterRowDef,
CdkHeaderRow,
Expand All @@ -24,7 +30,12 @@ import {
providers: [{provide: CdkHeaderRowDef, useExisting: MatHeaderRowDef}],
inputs: ['columns: matHeaderRowDef'],
})
export class MatHeaderRowDef extends CdkHeaderRowDef { }
export class MatHeaderRowDef extends CdkHeaderRowDef {
// TODO(andrewseguin): Remove this constructor after compiler-cli is updated; see issue #9329
constructor(template: TemplateRef<any>, _differs: IterableDiffers) {
super(template, _differs);
}
}

/**
* Footer row definition for the mat-table.
Expand All @@ -35,7 +46,12 @@ export class MatHeaderRowDef extends CdkHeaderRowDef { }
providers: [{provide: CdkFooterRowDef, useExisting: MatFooterRowDef}],
inputs: ['columns: matFooterRowDef'],
})
export class MatFooterRowDef extends CdkFooterRowDef { }
export class MatFooterRowDef extends CdkFooterRowDef {
// TODO(andrewseguin): Remove this constructor after compiler-cli is updated; see issue #9329
constructor(template: TemplateRef<any>, _differs: IterableDiffers) {
super(template, _differs);
}
}

/**
* Data row definition for the mat-table.
Expand All @@ -48,6 +64,10 @@ export class MatFooterRowDef extends CdkFooterRowDef { }
inputs: ['columns: matRowDefColumns', 'when: matRowDefWhen'],
})
export class MatRowDef<T> extends CdkRowDef<T> {
// TODO(andrewseguin): Remove this constructor after compiler-cli is updated; see issue #9329
constructor(template: TemplateRef<any>, _differs: IterableDiffers) {
super(template, _differs);
}
}

/** Footer template container that contains the cell outlet. Adds the right class and role. */
Expand Down