We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
component
Looks like animationFrameScheduler can stop working ReactiveX/rxjs#7018 because of this appRef.tick() is not called and view is not refreshed
Workaround is to use patch that will swap animationFrameScheduler with asyncScheduler
diff --git a/node_modules/@ngrx/component/fesm2020/ngrx-component.mjs b/node_modules/@ngrx/component/fesm2020/ngrx-component.mjs index 4de7471..ce90bcf 100644 --- a/node_modules/@ngrx/component/fesm2020/ngrx-component.mjs +++ b/node_modules/@ngrx/component/fesm2020/ngrx-component.mjs @@ -1,6 +1,6 @@ import * as i0 from '@angular/core'; import { NgZone, inject, Injectable, ChangeDetectorRef, Directive, Input, NgModule, Pipe } from '@angular/core'; -import { animationFrameScheduler, isObservable, from, Observable, ReplaySubject, pipe, Subscription } from 'rxjs'; +import { animationFrameScheduler, isObservable, from, Observable, ReplaySubject, pipe, Subscription, asyncScheduler } from 'rxjs'; import { distinctUntilChanged, switchMap, tap } from 'rxjs/operators'; function isNgZone(zone) { @@ -37,7 +37,7 @@ class AnimationFrameTickScheduler extends TickScheduler { schedule() { if (!this.isScheduled) { this.isScheduled = true; - animationFrameScheduler.schedule(() => { + asyncScheduler.schedule(() => { this.appRef.tick(); this.isScheduled = false; });
Another workaround could be: { provide TickScheduler, useClass: CustomAsyncScheduler } but TickScheduler is not exported
{ provide TickScheduler, useClass: CustomAsyncScheduler }
Angular CLI: 14.2.0 Node: 16.16.0 Angular: 14.2.1 rxjs: 7.5.7 typescript: 4.8.2 @ngrx/component: 14.3.1
No response
The text was updated successfully, but these errors were encountered:
fix(component): replace animationFrameScheduler with requestAnimation…
0a4d2dd
…Frame (#3592) Closes #3591
markostanimirovic
Successfully merging a pull request may close this issue.
Uh oh!
There was an error while loading. Please reload this page.
Which @ngrx/* package(s) are the source of the bug?
component
Minimal reproduction of the bug/regression with instructions
Looks like animationFrameScheduler can stop working ReactiveX/rxjs#7018 because of this appRef.tick() is not called and view is not refreshed
Workaround is to use patch that will swap animationFrameScheduler with asyncScheduler
Another workaround could be:
{ provide TickScheduler, useClass: CustomAsyncScheduler }
but TickScheduler is not exportedVersions of NgRx, Angular, Node, affected browser(s) and operating system(s)
Angular CLI: 14.2.0
Node: 16.16.0
Angular: 14.2.1
rxjs: 7.5.7
typescript: 4.8.2
@ngrx/component: 14.3.1
Other information
No response
I would be willing to submit a PR to fix this issue
The text was updated successfully, but these errors were encountered: