|
1 | | -import { Component, ViewChild, OnInit, DebugElement, QueryList, TemplateRef } from '@angular/core'; |
| 1 | +import { Component, ViewChild, OnInit, DebugElement, QueryList, TemplateRef, ContentChild, ViewChildren } from '@angular/core'; |
2 | 2 | import { TestBed, ComponentFixture, fakeAsync, tick, waitForAsync } from '@angular/core/testing'; |
3 | 3 | import { NoopAnimationsModule } from '@angular/platform-browser/animations'; |
4 | 4 | import { By } from '@angular/platform-browser'; |
@@ -366,7 +366,7 @@ describe('IgxGrid Master Detail #grid', () => { |
366 | 366 | grid.toggleRow(fix.componentInstance.data[0].ID); |
367 | 367 | fix.detectChanges(); |
368 | 368 | expect(grid.unpinnedColumns.map(c => c.field)).toEqual(['ContactName', 'CompanyName']); |
369 | | - expect(fix.componentInstance.childGrid.unpinnedColumns.map(c => c.field)).toEqual(['ColA', 'ColB']); |
| 369 | + expect(fix.componentInstance.childGrid.first.unpinnedColumns.map(c => c.field)).toEqual(['ColA', 'ColB']); |
370 | 370 | }); |
371 | 371 | }); |
372 | 372 |
|
@@ -1311,7 +1311,7 @@ export class DefaultGridMasterDetailComponent { |
1311 | 1311 | @ViewChild('gridTemplate', { read: TemplateRef, static: true }) |
1312 | 1312 | public gridTemplate: TemplateRef<any>; |
1313 | 1313 |
|
1314 | | - @ViewChild('childGrid', { read: IgxGridComponent, static: true }) |
| 1314 | + @ViewChildren('childGrid', { read: IgxGridComponent }) |
1315 | 1315 | public childGrid: IgxGridComponent; |
1316 | 1316 |
|
1317 | 1317 | public width = '800px'; |
|
0 commit comments