File tree Expand file tree Collapse file tree 1 file changed +6
-12
lines changed
projects/igniteui-angular/src/lib/grids Expand file tree Collapse file tree 1 file changed +6
-12
lines changed Original file line number Diff line number Diff line change @@ -356,21 +356,15 @@ export class IgxGridNavigationService {
356
356
357
357
public goToFirstCell ( ) {
358
358
const verticalScroll = this . grid . verticalScrollContainer . getScroll ( ) ;
359
- const horizontalScroll = this . grid . dataRowList . first . virtDirRow . getScroll ( ) ;
360
359
if ( verticalScroll . scrollTop === 0 ) {
361
360
this . onKeydownHome ( this . grid . dataRowList . first . index ) ;
362
361
} else {
363
- if ( ! horizontalScroll . clientWidth || parseInt ( horizontalScroll . scrollLeft , 10 ) <= 1 || this . grid . pinnedColumns . length ) {
364
- this . navigateTop ( 0 ) ;
365
- } else {
366
- this . getFocusableGrid ( ) . nativeElement . focus ( { preventScroll : true } ) ;
367
- this . horizontalScroll ( this . grid . dataRowList . first . index ) . scrollTo ( 0 ) ;
368
- this . grid . parentVirtDir . onChunkLoad
369
- . pipe ( first ( ) )
370
- . subscribe ( ( ) => {
371
- this . navigateTop ( 0 ) ;
372
- } ) ;
373
- }
362
+ this . getFocusableGrid ( ) . nativeElement . focus ( { preventScroll : true } ) ;
363
+ this . grid . verticalScrollContainer . scrollTo ( 0 ) ;
364
+ this . grid . verticalScrollContainer . onChunkLoad
365
+ . pipe ( first ( ) ) . subscribe ( ( ) => {
366
+ this . onKeydownHome ( this . grid . dataRowList . first . index ) ;
367
+ } ) ;
374
368
}
375
369
}
376
370
You can’t perform that action at this time.
0 commit comments