File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
projects/igniteui-angular/src/lib/grids Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -4096,7 +4096,13 @@ export abstract class IgxGridBaseDirective extends DisplayDensityBase implements
40964096 } ;
40974097 this . verticalScrollContainer . onDataChanged . pipe ( first ( ) ) . subscribe ( ( ) => {
40984098 this . cdr . detectChanges ( ) ;
4099- const row = this . getRowByIndex ( this . addRowParent . index + 1 ) ;
4099+ const newRowIndex = this . addRowParent . index + 1 ;
4100+ // ensure adding row is in view.
4101+ const shouldScroll = this . navigation . shouldPerformVerticalScroll ( newRowIndex , - 1 ) ;
4102+ if ( shouldScroll ) {
4103+ this . navigateTo ( newRowIndex , - 1 ) ;
4104+ }
4105+ const row = this . getRowByIndex ( newRowIndex ) ;
41004106 const cell = row . cells . find ( c => c . editable ) ;
41014107 cell . setEditMode ( true ) ;
41024108 cell . activate ( ) ;
You can’t perform that action at this time.
0 commit comments