mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
61142: RemoveByHrefSubstring fix
This commit is contained in:
@@ -108,7 +108,7 @@ export class ItemRelationshipsComponent extends AbstractItemUpdateComponent {
|
||||
// TODO: Fix lists refreshing correctly
|
||||
this.objectCache.remove(this.item.self);
|
||||
this.requestService.removeByHrefSubstring(this.item.self);
|
||||
this.itemService.findById(this.item.id).pipe(getSucceededRemoteData(), take(1)).subscribe((itemRD: RemoteData<Item>) => this.item = itemRD.payload);
|
||||
// this.itemService.findById(this.item.id).pipe(getSucceededRemoteData(), take(1)).subscribe((itemRD: RemoteData<Item>) => this.item = itemRD.payload);
|
||||
this.initializeOriginalFields();
|
||||
this.initializeUpdates();
|
||||
this.notificationsService.success(this.getNotificationTitle('saved'), this.getNotificationContent('saved'));
|
||||
|
@@ -2,7 +2,7 @@ import { Injectable } from '@angular/core';
|
||||
|
||||
import { createSelector, MemoizedSelector, select, Store } from '@ngrx/store';
|
||||
import { Observable, race as observableRace } from 'rxjs';
|
||||
import { filter, mergeMap, take } from 'rxjs/operators';
|
||||
import { filter, map, mergeMap, take, tap } from 'rxjs/operators';
|
||||
|
||||
import { AppState } from '../../app.reducer';
|
||||
import { hasValue, isNotEmpty } from '../../shared/empty.util';
|
||||
@@ -64,8 +64,7 @@ const uuidsFromHrefSubstringSelector =
|
||||
const getUuidsFromHrefSubstring = (state: IndexState, href: string): string[] => {
|
||||
let result = [];
|
||||
if (isNotEmpty(state)) {
|
||||
result = Object.values(state)
|
||||
.filter((value: string) => value.startsWith(href));
|
||||
result = Object.keys(state).filter((key) => key.startsWith(href)).map((key) => state[key]);
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
Reference in New Issue
Block a user