Skip to content

Commit 1ee4aff

Browse files
committed
fix(hierarchical-grid): add correct check for row and expansion indexes
1 parent d537904 commit 1ee4aff

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

projects/igniteui-angular/src/lib/grids/grid-base.directive.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6865,14 +6865,19 @@ export abstract class IgxGridBaseDirective extends DisplayDensityBase implements
68656865
const activeEl = this.selectionService.activeElement;
68666866

68676867
if (this.nativeElement.tagName.toLowerCase() === 'igx-hierarchical-grid') {
6868-
const expansionRowIndexes = Array.from(this.expansionStates.keys());
6868+
const expansionRowIndexes = [];
6869+
for (const [key, value] of this.expansionStates.entries()) {
6870+
if (value) {
6871+
expansionRowIndexes.push(key);
6872+
}
6873+
}
68696874
if (this.selectionService.selection.size > 0) {
68706875
if (expansionRowIndexes.length > 0) {
68716876
for (const [key, value] of this.selectionService.selection.entries()) {
68726877
let updatedKey = key;
68736878
expansionRowIndexes.forEach(row => {
68746879
let rowIndex;
6875-
if (row.ID) {
6880+
if (!isNaN(row.ID)) {
68766881
rowIndex = Number(row.ID);
68776882
}else {
68786883
rowIndex = Number(row);

0 commit comments

Comments
 (0)