From 167ffa666bd4c597f3a9dfc1c9da7d9d89763ca3 Mon Sep 17 00:00:00 2001 From: Vladimir Litvinchik Date: Sun, 29 Sep 2024 19:42:58 +0300 Subject: [PATCH] Fixed issue with navigation to the next worksheet. --- .../src/lib/excel-document/excel-document.component.ts | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/libs/viewer/src/lib/excel-document/excel-document.component.ts b/libs/viewer/src/lib/excel-document/excel-document.component.ts index cc19753e..f578d622 100644 --- a/libs/viewer/src/lib/excel-document/excel-document.component.ts +++ b/libs/viewer/src/lib/excel-document/excel-document.component.ts @@ -29,13 +29,6 @@ export class ExcelDocumentComponent extends DocumentComponent implements OnInit, } ngAfterViewInit() { - this.navigateService.navigate.subscribe((( - value => { - if (value) { - this.selectSheet(value); - } - }))); - const scrollbarWidth = this.getScrollBarWidth(); this.renderer.setStyle(this._elementRef.nativeElement.querySelector('.sheets'), 'right', this.getScrollBarWidth() + 'px'); this.renderer.setStyle(this._elementRef.nativeElement.querySelector('.sheets'), 'bottom', this.getScrollBarWidth() + 'px'); @@ -52,5 +45,6 @@ export class ExcelDocumentComponent extends DocumentComponent implements OnInit, selectSheet(number){ this.currentPageNo = number; + this.navigateService.navigateTo(number); } }