Skip to content

Commit

Permalink
Merge pull request #11064 from waratah/bug/10792
Browse files Browse the repository at this point in the history
🐛 10792 Resolve console console errors on table load
  • Loading branch information
yigitfindikli committed Jan 13, 2022
2 parents 7988188 + 1bba8e4 commit 25381b1
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') tableViewChild: ElementRef;
@ViewChild('table', { static: false }) 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 {
else if (this.wrapperViewChild?.nativeElement) {
if (this.wrapperViewChild.nativeElement.scrollTo) {
this.wrapperViewChild.nativeElement.scrollTo(options);
}
Expand Down

0 comments on commit 25381b1

Please sign in to comment.