From 387077882b2272407bc71723021626585b575ebd Mon Sep 17 00:00:00 2001 From: Sercan Yemen Date: Tue, 29 May 2018 15:07:13 +0300 Subject: [PATCH] Codebase improvements --- .../search-bar/search-bar.component.ts | 3 ++- .../components/shortcuts/shortcuts.component.ts | 17 +++++++++++------ 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/src/@fuse/components/search-bar/search-bar.component.ts b/src/@fuse/components/search-bar/search-bar.component.ts index 8c7180d7..aa75bee7 100644 --- a/src/@fuse/components/search-bar/search-bar.component.ts +++ b/src/@fuse/components/search-bar/search-bar.component.ts @@ -16,7 +16,7 @@ export class FuseSearchBarComponent implements OnInit, OnDestroy toolbarColor: string; @Output() - onInput: EventEmitter = new EventEmitter(); + onInput: EventEmitter; // Private private _unsubscribeAll: Subject; @@ -31,6 +31,7 @@ export class FuseSearchBarComponent implements OnInit, OnDestroy ) { // Set the defaults + this.onInput = new EventEmitter(); this.collapsed = true; // Set the private defaults diff --git a/src/@fuse/components/shortcuts/shortcuts.component.ts b/src/@fuse/components/shortcuts/shortcuts.component.ts index 58e743a0..9275ae1a 100644 --- a/src/@fuse/components/shortcuts/shortcuts.component.ts +++ b/src/@fuse/components/shortcuts/shortcuts.component.ts @@ -15,11 +15,11 @@ import { FuseConfigService } from '@fuse/services/config.service'; }) export class FuseShortcutsComponent implements OnInit, OnDestroy { - shortcutItems: any[] = []; + shortcutItems: any[]; navigationItems: any[]; filteredNavigationItems: any[]; - searching = false; - mobileShortcutsPanelActive = false; + searching: boolean; + mobileShortcutsPanelActive: boolean; toolbarColor: string; @Input() @@ -45,14 +45,19 @@ export class FuseShortcutsComponent implements OnInit, OnDestroy * @param {ObservableMedia} _observableMedia */ constructor( - private _renderer: Renderer2, private _cookieService: CookieService, + private _fuseConfigService: FuseConfigService, private _fuseMatchMediaService: FuseMatchMediaService, private _fuseNavigationService: FuseNavigationService, - private _fuseConfigService: FuseConfigService, - private _observableMedia: ObservableMedia + private _observableMedia: ObservableMedia, + private _renderer: Renderer2 ) { + // Set the defaults + this.shortcutItems = []; + this.searching = false; + this.mobileShortcutsPanelActive = false; + // Set the private defaults this._unsubscribeAll = new Subject(); }