I have this text input with a debounceTime
pipe, so that we don't hit the server too often while the user is typing the word:
this.keyUp$
.pipe(debounceTime(500))
.subscribe(data => this.onInputChanged.emit(data));
However, if the user hits Enter after entering the data, I would like to call onInputChanged
immediately.
How can I bypass the debounceTime
pipe depending on the key?