From 52d03d9f827d0a71c497b323d850d73a20288229 Mon Sep 17 00:00:00 2001 From: Sergey Andrievskiy Date: Wed, 16 Jan 2019 17:39:48 +0300 Subject: [PATCH] fix(search): emit activate and deactivate events --- .../theme/components/search/search.component.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/framework/theme/components/search/search.component.ts b/src/framework/theme/components/search/search.component.ts index 1fdfdfc045..6cfe819763 100644 --- a/src/framework/theme/components/search/search.component.ts +++ b/src/framework/theme/components/search/search.component.ts @@ -203,7 +203,7 @@ export class NbSearchFieldComponent implements OnChanges, AfterViewInit { changeDetection: ChangeDetectionStrategy.OnPush, styleUrls: ['styles/search.component.scss'], template: ` - + (close)="emitDeactivate()"> `, }) @@ -320,6 +320,14 @@ export class NbSearchComponent implements OnInit, OnDestroy { this.hideSearch(); } + emitActivate() { + this.searchService.activateSearch(this.type, this.tag); + } + + emitDeactivate() { + this.searchService.deactivateSearch(this.type, this.tag); + } + private removeLayoutClasses() { this.themeService.removeLayoutClass('with-search'); observableOf(null).pipe(delay(500)).subscribe(() => {