mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
Feedback processed: - change so state change behaviourSubjects back in NgZone.run
This commit is contained in:
@@ -25,14 +25,13 @@ export class CommunityListDatasource implements DataSource<FlatNode> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
loadCommunities(findOptions: FindListOptions, expandedNodes: FlatNode[]) {
|
loadCommunities(findOptions: FindListOptions, expandedNodes: FlatNode[]) {
|
||||||
this.loading$.next(true);
|
|
||||||
|
|
||||||
this.zone.runOutsideAngular(() => {
|
this.zone.runOutsideAngular(() => {
|
||||||
|
this.loading$.next(true);
|
||||||
this.communityListService.loadCommunities(findOptions, expandedNodes).pipe(
|
this.communityListService.loadCommunities(findOptions, expandedNodes).pipe(
|
||||||
take(1),
|
take(1),
|
||||||
finalize(() => this.loading$.next(false)),
|
finalize(() => this.zone.run(() => this.loading$.next(false))),
|
||||||
).subscribe((flatNodes: FlatNode[]) => {
|
).subscribe((flatNodes: FlatNode[]) => {
|
||||||
this.communityList$.next(flatNodes);
|
this.zone.run(() => this.communityList$.next(flatNodes));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user