From f2a2c52d435629bad2c9af68240d76dfefe4dfd9 Mon Sep 17 00:00:00 2001 From: "k.triantafyllou" Date: Wed, 30 Aug 2023 12:28:02 +0300 Subject: [PATCH] Add default parameter in close canvas --- sharedComponents/navigationBar.component.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sharedComponents/navigationBar.component.ts b/sharedComponents/navigationBar.component.ts index c8342f69..d2ed7fb6 100644 --- a/sharedComponents/navigationBar.component.ts +++ b/sharedComponents/navigationBar.component.ts @@ -87,6 +87,7 @@ export class NavigationBarComponent implements OnInit, OnDestroy, OnChanges { value: "Open Access" }; @ViewChild('search_input') search_input: SearchInputComponent; + @ViewChild('canvas') canvas: ElementRef; public routerHelper: RouterHelper = new RouterHelper(); constructor(private router: Router, @@ -102,7 +103,6 @@ export class NavigationBarComponent implements OnInit, OnDestroy, OnChanges { this.keyword = ""; })); this.subs.push(this.layoutService.hasStickyHeaderOnMobile.subscribe(hasStickyHeaderOnMobile => { - console.log(hasStickyHeaderOnMobile); this.hasStickyHeaderOnMobile = hasStickyHeaderOnMobile; })) this.initialize(); @@ -120,7 +120,7 @@ export class NavigationBarComponent implements OnInit, OnDestroy, OnChanges { } } - closeCanvas(element) { + closeCanvas(element = this.canvas.nativeElement) { UIkit.offcanvas(element).hide(); }