Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -1274,6 +1274,7 @@
%grid-display-container-tr {
width: 100%;
overflow: visible;
flex: 1;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change itself is fine, however since it changes the size of the cell's virtual container you'll also have to change how right pinning positions the cells. It currently sets an incorrect offset so if you pin any column to the right, you'll see that it's not correctly positioned to the right edge of the grid:

image

}

%grid-mrl-block {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -668,6 +668,18 @@ describe('Basic IgxHierarchicalGrid #hGrid', () => {
);
jasmine.getEnv().allowRespy(false);
});

it('should calculate correct column headers width when rowSelection + expand indicators', () => {
hierarchicalGrid.rowSelection = 'multiple';
fixture.detectChanges();

const headerRowElement = hierarchicalGrid.nativeElement.querySelector("igx-grid-header-row");
const headerRowDiv = headerRowElement.querySelector(".igx-grid__tr");
const headerRowChildren = Array.from(headerRowDiv.children);

const elementsWidth = headerRowChildren.reduce((acc,el) => acc+(el as HTMLElement).offsetWidth, 0);
expect(elementsWidth).toEqual((headerRowDiv as HTMLElement).offsetWidth);
});
});

describe('IgxHierarchicalGrid Row Islands #hGrid', () => {
Expand Down Expand Up @@ -1690,7 +1702,7 @@ describe('Basic IgxHierarchicalGrid #hGrid', () => {
UIInteractions.simulateClickAndSelectEvent(row.expander);
fixture.detectChanges();

let childGrid = hierarchicalGrid.gridAPI.getChildGrids()[0];
const childGrid = hierarchicalGrid.gridAPI.getChildGrids()[0];
const childRow = childGrid.gridAPI.get_row_by_index(0) as IgxHierarchicalRowComponent;
UIInteractions.simulateClickAndSelectEvent(childRow.expander);
fixture.detectChanges();
Expand Down
Loading