From 2752cd7a455e9354cf5b090a83f60543ec3436eb Mon Sep 17 00:00:00 2001 From: sercan Date: Thu, 13 Feb 2020 11:21:21 +0300 Subject: [PATCH] (Contacts) Reset the search filter when component destroyed to ensure the search will reset on route changes --- src/app/main/apps/contacts/contacts.component.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/app/main/apps/contacts/contacts.component.ts b/src/app/main/apps/contacts/contacts.component.ts index b535c43d..1e3357dc 100644 --- a/src/app/main/apps/contacts/contacts.component.ts +++ b/src/app/main/apps/contacts/contacts.component.ts @@ -77,6 +77,9 @@ export class ContactsComponent implements OnInit, OnDestroy */ ngOnDestroy(): void { + // Reset the search + this._contactsService.onSearchTextChanged.next(''); + // Unsubscribe from all subscriptions this._unsubscribeAll.next(); this._unsubscribeAll.complete();