Skip to content

Commit

Permalink
fix(search): fix search not un-subscribing from events (#185)
Browse files Browse the repository at this point in the history
  • Loading branch information
nnixaa authored Feb 2, 2018
1 parent 2e9d14a commit 691e100
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 30 deletions.
29 changes: 1 addition & 28 deletions docs/output.json
Original file line number Diff line number Diff line change
Expand Up @@ -2656,13 +2656,6 @@
"shortDescription": "",
"description": ""
},
{
"name": "componentFactoryResolver",
"type": "ComponentFactoryResolver",
"required": null,
"shortDescription": "",
"description": ""
},
{
"name": "router",
"type": "Router",
Expand Down Expand Up @@ -2700,26 +2693,6 @@
"shortDescription": "",
"description": ""
},
{
"examples": [],
"params": [
{
"name": "component",
"type": "any",
"required": null,
"shortDescription": "",
"description": ""
}
],
"platform": null,
"name": "createAttachedSearch",
"type": [
"Observable<any>"
],
"isStatic": false,
"shortDescription": "",
"description": ""
},
{
"examples": [],
"params": [],
Expand Down Expand Up @@ -13859,4 +13832,4 @@
"parent": "default"
}
}
}
}
4 changes: 2 additions & 2 deletions src/framework/theme/components/search/search.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ export class NbSearchComponent implements OnInit, AfterViewInit, OnDestroy {
)
.subscribe(event => this.searchService.deactivateSearch(this.searchType, this.tag));

combineLatest([
this.activateSearchSubscription = combineLatest([
this.searchFieldComponentRef$,
this.searchService.onSearchActivate(),
])
Expand All @@ -241,7 +241,7 @@ export class NbSearchComponent implements OnInit, AfterViewInit, OnDestroy {
componentRef.changeDetectorRef.detectChanges();
});

combineLatest([
this.deactivateSearchSubscription = combineLatest([
this.searchFieldComponentRef$,
this.searchService.onSearchDeactivate(),
])
Expand Down

0 comments on commit 691e100

Please sign in to comment.