Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ export abstract class IgxHierarchicalGridBaseDirective extends IgxGridBaseDirect
const columns = [];
const topLevelCols = cols.filter(c => c.level === 0);
topLevelCols.forEach((col) => {
col.grid = this;
const ref = this._createColumn(col);
ref.changeDetectorRef.detectChanges();
columns.push(ref.instance);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1038,6 +1038,23 @@ describe('Basic IgxHierarchicalGrid #hGrid', () => {
expect(hierarchicalGrid.childLayoutList.first.columns.length).toEqual(0, 'Columns length should be 0 after toggle');
expect(hierarchicalGrid.childLayoutList.first.columnList.length).toEqual(0, 'ColumnList length should be 0 after toggle');
}));

it('should resolve child grid cols default editable prop correctly based on row island\'s rowEditable.', () => {
hierarchicalGrid.rowEditable = false;
hierarchicalGrid.childLayoutList.first.rowEditable = true;
fixture.detectChanges();
// expand row
const row = hierarchicalGrid.gridAPI.get_row_by_index(0) as IgxHierarchicalRowComponent;
UIInteractions.simulateClickAndSelectEvent(row.expander);
fixture.detectChanges();

//check child grid column are editable
const childGrids = fixture.debugElement.queryAll(By.css('igx-child-grid-row'));
const childGrid1 = childGrids[0].query(By.css('igx-hierarchical-grid')).componentInstance;

expect(childGrid1.columns[0].editable).toBeTrue();
expect(childGrid1.columns[1].editable).toBeTrue();
});
});

describe('IgxHierarchicalGrid Children Sizing #hGrid', () => {
Expand Down
Loading