Skip to content

Commit aa6e809

Browse files
authored
Merge pull request #4871 from IgniteUI/fix-#4859
fix(grid-mrl): row editing is not correctly applied in MRL mode
2 parents 751a94a + deecdad commit aa6e809

File tree

4 files changed

+22
-5
lines changed

4 files changed

+22
-5
lines changed

projects/igniteui-angular/src/lib/core/styles/components/grid/_grid-component.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,10 @@
128128
@extend %grid-row--mrl !optional;
129129
}
130130

131+
@include e(tr, $mods: (mrl, edit)) {
132+
@extend %grid-row--edit-mrl !optional;
133+
}
134+
131135
@include e(summaries) {
132136
@extend %grid-summaries !optional;
133137

projects/igniteui-angular/src/lib/core/styles/components/grid/_grid-theme.scss

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -708,7 +708,9 @@
708708
}
709709

710710
%grid-row--mrl {
711-
border-bottom: none !important;
711+
&%grid-row {
712+
border-bottom-color: transparent;
713+
}
712714

713715
%grid__cbx-selection,
714716
%igx-grid__row-indentation,
@@ -907,6 +909,10 @@
907909
background: --var($theme, 'edit-mode-color');
908910
}
909911

912+
&%grid-row {
913+
border-bottom: 1px solid --var($theme, 'edit-mode-color');
914+
}
915+
910916
%igx-grid__td--editing {
911917
border: none;
912918

@@ -920,6 +926,13 @@
920926
}
921927
}
922928

929+
%grid-row--edit-mrl {
930+
&:first-of-type::after {
931+
top: 0;
932+
z-index: 5;
933+
}
934+
}
935+
923936
%igx-grid__tr--edited {
924937
&::before {
925938
content: '';

projects/igniteui-angular/src/lib/grids/grid/grid.multi-row-layout.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1091,7 +1091,7 @@ describe('IgxGrid - multi-row-layout', () => {
10911091
expect(lastRow.element.nativeElement.getBoundingClientRect().bottom).toBe(grid.tbody.nativeElement.getBoundingClientRect().bottom);
10921092

10931093
// check size is correct
1094-
expect(grid.verticalScrollContainer.getSizeAt(lastIndex)).toBe(150);
1094+
expect(grid.verticalScrollContainer.getSizeAt(lastIndex)).toBe(151);
10951095

10961096
// check DOM
10971097
const lastRowCells = lastRow.cells.toArray();

src/app/grid-multi-row-layout/grid-mrl.sample.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<div class="sample-wrapper">
22
<app-page-header title="Grid MRL"></app-page-header>
33
<section style="height: 800px" class="sample-content">
4-
<igx-grid [rowSelectable]="true" #grid [data]="data" displayDensity="compact" [width]="'100%'" [showToolbar]='true' [columnHiding]='true'>
4+
<igx-grid [rowEditable]="true" [primaryKey]="'PostalCode'" [rowSelectable]="true" #grid [data]="data" displayDensity="compact" [width]="'100%'" [showToolbar]='true' [columnHiding]='true'>
55
<igx-column-layout [movable]="false" [pinned]="true" field='group1'>
66
<igx-column [rowStart]="1" [colStart]="1" [colEnd]="5" field="ContactName"></igx-column>
77
<igx-column [rowStart]="1" [colStart]="5" field="ContactTitle"></igx-column>
@@ -13,8 +13,8 @@
1313
<igx-column [rowStart]="3" [colStart]="2" field="PostalCode"></igx-column>
1414
<igx-column [rowStart]="3" [colStart]="3" [colEnd]="7" field="Fax"></igx-column>
1515
</igx-column-layout>
16-
<igx-column-layout [movable]="false" [pinned]="false" field='group2'>
17-
<igx-column [rowStart]="1" [colStart]="1" [movable]="false" [pinned]="false" sortable="true" field="ContactName" [width]='"500px"'></igx-column>
16+
<igx-column-layout [movable]="false" [pinned]="true" field='group2'>
17+
<igx-column [rowStart]="1" [colStart]="1" [movable]="false" sortable="true" field="ContactName" [width]='"500px"'></igx-column>
1818
<igx-column [rowStart]="1" [colStart]="2" [movable]="false" sortable="true" field="ContactTitle" [width]='"200px"'></igx-column>
1919
<igx-column [rowStart]="1" [colStart]="3" [movable]="false" sortable="true" field="Country" [width]='"150px"'></igx-column>
2020
<igx-column [rowStart]="1" [colStart]="4" [movable]="false" sortable="true" field="Phone" [width]='"150px"'></igx-column>

0 commit comments

Comments
 (0)