Skip to content

Commit f35b98f

Browse files
authored
Merge branch 'master' into vmihalkov/fix-10074
2 parents 522d1af + 5dc5d45 commit f35b98f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

projects/igniteui-angular/src/lib/grids/common/crud.service.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,9 @@ export class IgxGridCRUDService extends IgxRowAddCrudState {
586586
this.grid.notifyChanges(true);
587587

588588
this.grid.navigateTo(this.row.index, -1);
589-
const dummyRow = this.grid.gridAPI.get_row_by_index(this.row.index);
589+
// when selecting the dummy row we need to adjust for top pinned rows
590+
const indexAdjust = this.grid.isRowPinningToTop && !this.addRowParent.isPinned ? this.grid.pinnedRows.length : 0;
591+
const dummyRow = this.grid.gridAPI.get_row_by_index(this.row.index + indexAdjust);
590592
dummyRow.triggerAddAnimation();
591593
dummyRow.cdr.detectChanges();
592594
dummyRow.addAnimationEnd.pipe(first()).subscribe(() => {

0 commit comments

Comments
 (0)