mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-12 04:23:04 +00:00
fix issue where relationship lists wouldn't update automatically from the second submit onwards
This commit is contained in:
@@ -309,13 +309,19 @@ export class RelationshipDataService extends IdentifiableDataService<Relationshi
|
||||
} else {
|
||||
findListOptions.searchParams = searchParams;
|
||||
}
|
||||
const result$ = this.searchBy('byLabel', findListOptions, useCachedVersionIfAvailable, reRequestOnStale, ...linksToFollow);
|
||||
|
||||
// always set reRequestOnStale to false here, so it doesn't happen automatically in BaseDataService
|
||||
const result$ = this.searchBy('byLabel', findListOptions, useCachedVersionIfAvailable, false, ...linksToFollow);
|
||||
|
||||
// add this result as a dependency of the item, meaning that if the item is invalided, this
|
||||
// result will be as well
|
||||
this.addDependency(result$, item.self);
|
||||
this.addDependency(result$, item._links.self.href);
|
||||
|
||||
return result$;
|
||||
// do the reRequestOnStale call here, to ensure any re-requests also get added as dependencies
|
||||
return result$.pipe(
|
||||
this.reRequestStaleRemoteData(reRequestOnStale, () =>
|
||||
this.getItemRelationshipsByLabel(item, label, options, useCachedVersionIfAvailable, reRequestOnStale, ...linksToFollow)),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user