Skip to content
Merged
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
20 changes: 10 additions & 10 deletions src/lib/table/table.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@ class MatTableApp {
columnsToRender = ['column_a', 'column_b', 'column_c'];
isFourthRow = (i: number, _rowData: TestData) => i == 3;

@ViewChild(MatTable) table: MatTable<TestData>;
@ViewChild(MatTable, {static: true}) table: MatTable<TestData>;
}

@Component({
Expand Down Expand Up @@ -595,7 +595,7 @@ class NativeHtmlTableApp {
dataSource: FakeDataSource | null = new FakeDataSource();
columnsToRender = ['column_a', 'column_b', 'column_c'];

@ViewChild(MatTable) table: MatTable<TestData>;
@ViewChild(MatTable, {static: true}) table: MatTable<TestData>;
}

@Component({
Expand All @@ -615,7 +615,7 @@ class StickyTableApp {
dataSource = new FakeDataSource();
columnsToRender = ['column_a'];

@ViewChild(MatTable) table: MatTable<TestData>;
@ViewChild(MatTable, {static: true}) table: MatTable<TestData>;
}


Expand Down Expand Up @@ -682,9 +682,9 @@ class ArrayDataSourceMatTableApp implements AfterViewInit {
dataSource = new MatTableDataSource<TestData>();
columnsToRender = ['column_a', 'column_b', 'column_c'];

@ViewChild(MatTable) table: MatTable<TestData>;
@ViewChild(MatPaginator) paginator: MatPaginator;
@ViewChild(MatSort) sort: MatSort;
@ViewChild(MatTable, {static: true}) table: MatTable<TestData>;
@ViewChild(MatPaginator, {static: true}) paginator: MatPaginator;
@ViewChild(MatSort, {static: true}) sort: MatSort;
@ViewChild(MatSortHeader) sortHeader: MatSortHeader;

constructor() {
Expand Down Expand Up @@ -735,8 +735,8 @@ class MatTableWithSortApp implements OnInit {
dataSource = new MatTableDataSource<TestData>();
columnsToRender = ['column_a', 'column_b', 'column_c'];

@ViewChild(MatTable) table: MatTable<TestData>;
@ViewChild(MatSort) sort: MatSort;
@ViewChild(MatTable, {static: true}) table: MatTable<TestData>;
@ViewChild(MatSort, {static: true}) sort: MatSort;

constructor() {
this.underlyingDataSource.data = [];
Expand Down Expand Up @@ -786,8 +786,8 @@ class MatTableWithPaginatorApp implements OnInit {
dataSource = new MatTableDataSource<TestData>();
columnsToRender = ['column_a', 'column_b', 'column_c'];

@ViewChild(MatTable) table: MatTable<TestData>;
@ViewChild(MatPaginator) paginator: MatPaginator;
@ViewChild(MatTable, {static: true}) table: MatTable<TestData>;
@ViewChild(MatPaginator, {static: true}) paginator: MatPaginator;

constructor() {
this.underlyingDataSource.data = [];
Expand Down