Skip to content

Commit 4667bb0

Browse files
MKirovaMKirova
authored andcommitted
chore(*): Add handling if different rows have different sizes.
1 parent e160c65 commit 4667bb0

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -599,8 +599,12 @@ export class IgxRowDirective implements DoCheck, AfterViewInit, OnDestroy {
599599

600600
protected getMergeCellSpan(col: ColumnType){
601601
const rowCount = this.data.cellMergeMeta.get(col.field).rowSpan;
602-
const rowH = this.grid.verticalScrollContainer.getSizeAt(this.index);
603-
return `repeat(${rowCount},${rowH}px)`;
602+
let sizeSpans = "";
603+
for (let index = this.index; index < this.index + rowCount; index++) {
604+
const size = this.grid.verticalScrollContainer.getSizeAt(index);
605+
sizeSpans += size + 'px ';
606+
}
607+
return `${sizeSpans}`;
604608
}
605609

606610
protected getRowHeight() {

src/app/grid-cellMerging/grid-cellMerging.component.html

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,11 @@ <h4 class="sample-title">Grid with cell merge</h4>
44
<ng-template igxCell let-cell="cell" let-val>
55
<div>
66
<button igxButton>Test</button>
7-
<br/>
8-
<button igxButton>Test 2</button>
7+
@if (cell.row.index % 2 == 0) {
8+
<br/>
9+
<button igxButton>Test 2</button>
10+
}
11+
912
</div>
1013
</ng-template>
1114
</igx-column>

0 commit comments

Comments
 (0)