From 6fd5b80bf49caacec7746eafe5dffc334e821b08 Mon Sep 17 00:00:00 2001 From: Marc Laval Date: Tue, 12 Mar 2019 16:59:22 +0100 Subject: [PATCH] test(table): update static query test --- src/lib/table/table.spec.ts | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/lib/table/table.spec.ts b/src/lib/table/table.spec.ts index 9d11c4253ac1..bac5eee59ae3 100644 --- a/src/lib/table/table.spec.ts +++ b/src/lib/table/table.spec.ts @@ -565,7 +565,7 @@ class MatTableApp { columnsToRender = ['column_a', 'column_b', 'column_c']; isFourthRow = (i: number, _rowData: TestData) => i == 3; - @ViewChild(MatTable) table: MatTable; + @ViewChild(MatTable, {static: true}) table: MatTable; } @Component({ @@ -595,7 +595,7 @@ class NativeHtmlTableApp { dataSource: FakeDataSource | null = new FakeDataSource(); columnsToRender = ['column_a', 'column_b', 'column_c']; - @ViewChild(MatTable) table: MatTable; + @ViewChild(MatTable, {static: true}) table: MatTable; } @Component({ @@ -615,7 +615,7 @@ class StickyTableApp { dataSource = new FakeDataSource(); columnsToRender = ['column_a']; - @ViewChild(MatTable) table: MatTable; + @ViewChild(MatTable, {static: true}) table: MatTable; } @@ -682,9 +682,9 @@ class ArrayDataSourceMatTableApp implements AfterViewInit { dataSource = new MatTableDataSource(); columnsToRender = ['column_a', 'column_b', 'column_c']; - @ViewChild(MatTable) table: MatTable; - @ViewChild(MatPaginator) paginator: MatPaginator; - @ViewChild(MatSort) sort: MatSort; + @ViewChild(MatTable, {static: true}) table: MatTable; + @ViewChild(MatPaginator, {static: true}) paginator: MatPaginator; + @ViewChild(MatSort, {static: true}) sort: MatSort; @ViewChild(MatSortHeader) sortHeader: MatSortHeader; constructor() { @@ -735,8 +735,8 @@ class MatTableWithSortApp implements OnInit { dataSource = new MatTableDataSource(); columnsToRender = ['column_a', 'column_b', 'column_c']; - @ViewChild(MatTable) table: MatTable; - @ViewChild(MatSort) sort: MatSort; + @ViewChild(MatTable, {static: true}) table: MatTable; + @ViewChild(MatSort, {static: true}) sort: MatSort; constructor() { this.underlyingDataSource.data = []; @@ -786,8 +786,8 @@ class MatTableWithPaginatorApp implements OnInit { dataSource = new MatTableDataSource(); columnsToRender = ['column_a', 'column_b', 'column_c']; - @ViewChild(MatTable) table: MatTable; - @ViewChild(MatPaginator) paginator: MatPaginator; + @ViewChild(MatTable, {static: true}) table: MatTable; + @ViewChild(MatPaginator, {static: true}) paginator: MatPaginator; constructor() { this.underlyingDataSource.data = [];