[ACA-1715] Search popup appears when navigating away from search results (#610)

This commit is contained in:
Suzana Dirla
2018-09-06 13:45:23 +03:00
committed by Denys Vuika
parent c687c22cc3
commit f03196d424
3 changed files with 11 additions and 2 deletions

View File

@@ -117,13 +117,14 @@ export class SearchInputControlComponent implements OnInit, OnDestroy {
subscriptAnimationState: string;
noSearchResultTemplate: TemplateRef <any> = null;
skipToggle = false;
toggleDebounceTime = 200;
private toggleSearch = new Subject<any>();
private focusSubject = new Subject<FocusEvent>();
constructor(private thumbnailService: ThumbnailService) {
this.toggleSearch.asObservable().pipe(debounceTime(200)).subscribe(() => {
this.toggleSearch.asObservable().pipe(debounceTime(this.toggleDebounceTime)).subscribe(() => {
if (this.expandable && !this.skipToggle) {
this.subscriptAnimationState = this.subscriptAnimationState === 'inactive' ? 'active' : 'inactive';