Skip to content

Commit

Permalink
Refactor #10792
Browse files Browse the repository at this point in the history
  • Loading branch information
yigitfindikli committed Jan 13, 2022
1 parent 25381b1 commit f449570
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/app/components/table/table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ export class Table implements OnInit, AfterViewInit, AfterContentInit, Blockable

@ViewChild('wrapper') wrapperViewChild: ElementRef;

@ViewChild('table', { static: false }) tableViewChild: ElementRef;
@ViewChild('table') tableViewChild: ElementRef;

@ViewChild('tableHeader') tableHeaderViewChild: ElementRef;

Expand Down Expand Up @@ -1801,7 +1801,7 @@ export class Table implements OnInit, AfterViewInit, AfterContentInit, Blockable
if (this.virtualScrollBody) {
this.virtualScrollBody.scrollTo(options);
}
else if (this.wrapperViewChild?.nativeElement) {
else if (this.wrapperViewChild && this.wrapperViewChild.nativeElement) {
if (this.wrapperViewChild.nativeElement.scrollTo) {
this.wrapperViewChild.nativeElement.scrollTo(options);
}
Expand Down

0 comments on commit f449570

Please sign in to comment.