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(igxHierarchicalGrid): Fix column grid owner before copying column… #15206

Open
wants to merge 2 commits into
base: 18.2.x
Choose a base branch
from
Open
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