Skip to content

Commit 3de7752

Browse files
MKirovaMKirova
authored andcommitted
chore(*): Fix mrl col indexes.
1 parent e8e56d4 commit 3de7752

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

projects/igniteui-angular/src/lib/grids/columns/column-layout.component.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,10 +157,14 @@ export class IgxColumnLayoutComponent extends IgxColumnGroupComponent implements
157157
: [];
158158
const orderedCols = columns
159159
.filter(x => !x.columnGroup && !x.hidden)
160-
.sort((a, b) => columns.indexOf(a.parent) - columns.indexOf(b.parent) || a.rowStart - b.rowStart || a.colStart - b.colStart);
160+
.sort((a, b) => a.rowStart - b.rowStart || columns.indexOf(a.parent) - columns.indexOf(b.parent) || a.colStart - b.colStart);
161161
this.children.forEach(child => {
162+
const rs = child.rowStart || 1;
162163
let vIndex = 0;
163-
vIndex = orderedCols.indexOf(child);
164+
// filter out all cols with larger rowStart
165+
const cols = orderedCols.filter(c =>
166+
!c.columnGroup && (c.rowStart || 1) <= rs);
167+
vIndex = cols.indexOf(child);
164168
this.childrenVisibleIndexes.push({ column: child, index: vIndex });
165169
});
166170
}

0 commit comments

Comments
 (0)