Skip to content

Commit 02701c1

Browse files
MKirovaMKirova
authored andcommitted
chore(*): Fix mrl issue. Fix tree grid and hgrid cell heights.
1 parent ca14a71 commit 02701c1

File tree

4 files changed

+17
-7
lines changed

4 files changed

+17
-7
lines changed

projects/igniteui-angular/src/lib/grids/hierarchical-grid/hierarchical-row.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
[formatter]="col.formatter"
6262
[row]="this"
6363
[active]="isCellActive(col.visibleIndex)"
64-
[style.min-height.px]="grid.rowHeight || 32"
64+
[style.min-height.px]="cellHeight"
6565
[rowData]="rowData"
6666
[style.min-width]="col.width"
6767
[style.max-width]="col.width"
@@ -109,7 +109,7 @@
109109
[active]="isCellActive(col.visibleIndex)"
110110
[firstPinned]="col.isFirstPinned"
111111
[lastPinned]="col.isLastPinned"
112-
[style.min-height.px]="grid.rowHeight || 32"
112+
[style.min-height.px]="cellHeight"
113113
[rowData]="rowData"
114114
[style.min-width]="col.width"
115115
[style.max-width]="col.width"

projects/igniteui-angular/src/lib/grids/row.directive.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,13 @@ export class IgxRowDirective<T extends IgxGridBaseDirective & GridType> implemen
104104

105105
@HostBinding('style.min-height.px')
106106
get rowHeight() {
107-
return this.addRow ? this.grid.rowHeight || 32 : null;
107+
let height = this.grid.rowHeight || 32;
108+
if (this.grid.hasColumnLayouts) {
109+
const rs = this.columns.map(x => x.gridRowSpan);
110+
const maxRowSpan = Math.max(... rs);
111+
height = height * maxRowSpan;
112+
}
113+
return this.addRow ? height : null;
108114
}
109115

110116
get cellHeight() {

projects/igniteui-angular/src/lib/grids/tree-grid/tree-grid-row.component.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
[column]="col"
3737
[formatter]="col.formatter"
3838
[row]="this"
39-
[style.min-height.px]="grid.rowHeight || 32"
39+
[style.min-height.px]="cellHeight"
4040
[rowData]="rowData"
4141
[style.min-width]="col.width"
4242
[style.max-width]="col.width"
@@ -68,7 +68,7 @@
6868
[column]="col"
6969
[formatter]="col.formatter"
7070
[row]="this"
71-
[style.min-height.px]="grid.rowHeight || 32"
71+
[style.min-height.px]="cellHeight"
7272
[rowData]="rowData"
7373
[style.min-width]="col.width"
7474
[style.max-width]="col.width"
@@ -121,7 +121,7 @@
121121
[row]="this"
122122
[firstPinned]="col.isFirstPinned"
123123
[lastPinned]="col.isLastPinned"
124-
[style.min-height.px]="grid.rowHeight || 32"
124+
[style.min-height.px]="cellHeight"
125125
[rowData]="rowData"
126126
[style.min-width]="col.width"
127127
[style.max-width]="col.width"
@@ -154,7 +154,7 @@
154154
[formatter]="col.formatter"
155155
[row]="this"
156156
[lastPinned]="col.isLastPinned"
157-
[style.min-height.px]="grid.rowHeight || 32"
157+
[style.min-height.px]="cellHeight"
158158
[rowData]="rowData"
159159
[style.min-width]="col.width"
160160
[style.max-width]="col.width"

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@
2222
<igx-column [rowStart]="1" [width]="'10%'" [resizable]='true' [colStart]="2" [movable]="false" sortable="true" field="Phone"></igx-column>
2323
<igx-column [rowStart]="2" [resizable]='true' [colStart]="1" [colEnd]="3" [rowEnd]="4" [movable]="false" sortable="true" field="Fax"></igx-column>
2424
</igx-column-layout>
25+
<igx-action-strip #actionstrip>
26+
<igx-grid-pinning-actions></igx-grid-pinning-actions>
27+
<igx-grid-editing-actions [addRow]="true"></igx-grid-editing-actions>
28+
</igx-action-strip>
2529
</igx-grid>
2630
<span igxButton (click)="hideGroup()">Hide/Show second group</span>
2731
<span igxButton (click)="pinGroup()">Pin/Unpin second group</span>

0 commit comments

Comments
 (0)