#How can I refresh streams in combineLatest method
9 messages · Page 1 of 1 (latest)
What's the point of a combineLatest with an array with single element?
I have 3 more different reports. In this sample I just want to learn how can I manage process. Otherwise it's not logical for single record. My bad i should explain tnx for help 🙂
this._refreshSub$ = new BehaviorSubject<void>(undefined);
this.somethingThatMightNeedRefreshing$ = this._refreshSub$.pipe(
switchMap((): Observable<Something> => this.service.something$),
);
public doSomething(): void {
this._refreshSub$.next();
}
This is a general naïve pattern for refreshing Observables on demand.
Specific cases might have better options
@south halo First of thanks for answer but still template is not renewing with your example I'm using ChangeDetectionStrategy.OnPush for FailedRecordsChartComponent also I'm this.cdr.detectChanges(); detecting after refresh.
Show code
Okay, I fix it, sorry for waste yours time palls 😢 It's all about me I was refresh for dto class but I also wanted to rerender to chart obj my bad It's not a logical problem. Should I remove this post ? @south halo
You can close the post if you like, but after a period of inactivity it will automatically be archived.