Skip to content

Commit 3ec4dcf

Browse files
authored
Merge pull request #5670 from IgniteUI/fix-#3918-7.3.x
fix(grid): set flex shrink to 0 for all display containers
2 parents 4d53291 + c70ec6d commit 3ec4dcf

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

projects/igniteui-angular/src/lib/core/styles/components/_common/_igx-display-container.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
position: relative;
44
width: 100%;
55
overflow: hidden;
6+
flex-shrink: 0;
67
}
78

89
%display-container--inactive {

projects/igniteui-angular/src/lib/grids/grid/grid.component.spec.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1313,10 +1313,13 @@ describe('IgxGrid Component Tests', () => {
13131313
fix.detectChanges();
13141314
await wait(16);
13151315
// check UI
1316+
const rowSelectorHeader = fix.nativeElement.querySelector('.igx-grid__thead').querySelector('.igx-grid__cbx-selection');
13161317
const header0 = fix.debugElement.queryAll(By.css('igx-grid-header-group'))[0];
13171318
const header1 = fix.debugElement.queryAll(By.css('igx-grid-header-group'))[1];
13181319
const header2 = fix.debugElement.queryAll(By.css('igx-grid-header-group'))[2];
1319-
expect(header0.nativeElement.offsetWidth).toEqual(Math.round(0.7 * grid.unpinnedWidth));
1320+
const expectedWidth = Math.round(0.7 * (grid.unpinnedWidth + rowSelectorHeader.offsetWidth));
1321+
expect(header0.nativeElement.offsetWidth).toBeGreaterThanOrEqual(expectedWidth - 1);
1322+
expect(header0.nativeElement.offsetWidth).toBeLessThanOrEqual(expectedWidth + 1);
13201323
expect(header1.nativeElement.offsetWidth).toEqual(136);
13211324
expect(header2.nativeElement.offsetWidth).toEqual(136);
13221325
expect(hScroll.nativeElement.hidden).toBe(false);

0 commit comments

Comments
 (0)