I have BehaviorSubject property
public results$ = new BehaviorSubject(null);
Lets'say I have a subscription to this
this.results$.subscribe(() => this.find());
Subscription in being invoked each time when I press any key on keyboards inside input element. So, to prevent many requests to the server, I added debounceTime()
this.results$
.pipe(debounceTime(500))
.subscribe(() => this.find());
But I need to invoke the first this.find() without any debounce, just immediately.
How can I do that?