Skip to content
Snippets Groups Projects
Commit 6433e211 authored by Marie Verdonck's avatar Marie Verdonck
Browse files

Feedback processed: - change so state change behaviourSubjects back in NgZone.run

parent 94e3f2d5
No related merge requests found
......@@ -25,14 +25,13 @@ export class CommunityListDatasource implements DataSource<FlatNode> {
}
loadCommunities(findOptions: FindListOptions, expandedNodes: FlatNode[]) {
this.loading$.next(true);
this.zone.runOutsideAngular(() => {
this.loading$.next(true);
this.communityListService.loadCommunities(findOptions, expandedNodes).pipe(
take(1),
finalize(() => this.loading$.next(false)),
finalize(() => this.zone.run(() => this.loading$.next(false))),
).subscribe((flatNodes: FlatNode[]) => {
this.communityList$.next(flatNodes);
this.zone.run(() => this.communityList$.next(flatNodes));
});
});
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment