You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
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