I'm trying to figure out how to "reset" a previous Observable that has a delay. My goal is such that when I click a button, it runs an action; at the end of that action, after waiting a defined amount of time, the action runs finalize to reset a value.
Here is a Stackblitz of what I mean.
If I click "Save new event", it will display a number. After 3 seconds, the number will disappear. The issue is if I click it once, it starts the delay--but then if I click it again after 1 second has passed, it will display the new number--but then 2 seconds later the number disappears since the first Observable sets {saveSuccess: null}.
Is there some RXJS magic that can accomplish what I want to do?