Skip to content

Instantly share code, notes, and snippets.

@ardydedase
Created February 6, 2022 16:13
Show Gist options
  • Save ardydedase/74c0f25dcf65cf2cdb0ae2188f2c68ba to your computer and use it in GitHub Desktop.
Save ardydedase/74c0f25dcf65cf2cdb0ae2188f2c68ba to your computer and use it in GitHub Desktop.
Sample app initSearchUsers method
initSearchUsers(): void {
this.searchUsersFormControl.valueChanges
.pipe(takeUntil(this.destroyed$))
.subscribe((searchString) => {
if (searchString) {
this.searchType = SearchType.USERS;
this.searchSubject$.next(searchString);
}
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment