Skip to content

Commit f160cab

Browse files
MKirovaMKirova
authored andcommitted
chore(*): Additional small fixes.
1 parent c1d8a3c commit f160cab

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

projects/igniteui-angular/src/lib/grids/grid/grid.pipes.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,8 @@ export class IgxGridUnmergeActivePipe implements PipeTransform {
121121
rootsToUpdate.push(root);
122122
});
123123
});
124-
125-
rootsToUpdate.forEach(x => {
124+
const uniqueRoots = rootsToUpdate.filter((val, idx, arr) => arr.indexOf(val) === idx);
125+
uniqueRoots.forEach(x => {
126126
const index = result.indexOf(x);
127127
const colKeys = [...x.cellMergeMeta.keys()];
128128
const cols = colsToMerge.filter(x => colKeys.indexOf(x.field) !== -1);
@@ -138,13 +138,13 @@ export class IgxGridUnmergeActivePipe implements PipeTransform {
138138
col.field,
139139
col.mergingComparer,
140140
res,
141-
activeRowIndexes,
141+
activeRowIndexes.map(x => x - index),
142142
isDate,
143143
isTime,
144144
this.grid);
145145

146146
}
147-
result.splice(index, (index + res.length - 1), ...res);
147+
result.splice(index, res.length, ...res);
148148
});
149149

150150

0 commit comments

Comments
 (0)