-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
debounceTime doesn't work with Subject #1081
Comments
Would you elaborate bit more detail of 'doesn't work'? I tried this
and could see |
Hm, it seems that |
By doesn't work I meant it was not emitting at all. |
Ah, that's currently expected behavior from implementation of
it only emits if it explicitly have values to be emitted. So while subject emits note : just clarify, 'currently expected behavior ' simply means it works in those way for now. |
looks inconsistent |
Behavior perspective it does. Few things to be considered are,
|
due to current null check, debounceTime does not allow value to be undefined. This change updates behavior to align behavior as same as RxJS4 does. closes ReactiveX#1081
@kwonoj debounceTime should have a hasValue-based implementation, like e.g. distinctUntilChanged: class DistinctUntilChangedSubscriber<T> extends Subscriber<T> {
private value: T;
private hasValue: boolean = false; So this bug is legit it seems. |
@staltz , Yes, @mattpodwysocki suggested same approach in current PR (#1083 (comment)). I'm updating PR to reflect suggestions. |
due to current null check, debounceTime does not allow value to be undefined. This change updates behavior to align behavior as same as RxJS4 does. closes ReactiveX#1081
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
We had a discussion here angular/angular#5925. It seems that
throttleTime
works withSubject
anddebounceTime
doesn't work withSubject
.throttleTime
: http://jsfiddle.net/bo6ynqf7/1/debounceTime
: http://jsfiddle.net/8g968xh7/1/The text was updated successfully, but these errors were encountered: