debounceTime config with { leading: true } #7449
EugeneHerasymchuk
started this conversation in
Ideas / Feature request
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In current behaviour, throttleTime has configuration (default is
{ leading:true}
at the moment) allowing to emit first event immediately and last event, throttling for N time the others.Proposition:
would it be reasonable to add similar config for debounceTime. Theoretically, the default is already
{ trailing: true }
- we receive the most recent event at the end of debounce time.With
{ leading: true}
the expected behaviour would be - we receive the first item after "the last item of the debounce subscription + debounce timeout".This would allow to have marble diagram that I provided at the end. 'A' was the first value and it will emit only on 800ms
throttleTime:
debounceTime:
expected debounceTime with
leading:true
:Beta Was this translation helpful? Give feedback.
All reactions