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 {
356356
357357 public goToFirstCell ( ) {
358358 const verticalScroll = this . grid . verticalScrollContainer . getScroll ( ) ;
359- const horizontalScroll = this . grid . dataRowList . first . virtDirRow . getScroll ( ) ;
360359 if ( verticalScroll . scrollTop === 0 ) {
361360 this . onKeydownHome ( this . grid . dataRowList . first . index ) ;
362361 } 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+ } ) ;
374368 }
375369 }
376370
You can’t perform that action at this time.
0 commit comments