mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-11 03:53:02 +00:00
autoselect + small fixes
This commit is contained in:
@@ -85,9 +85,7 @@ export class SelectableListService {
|
||||
*/
|
||||
isObjectSelected(id: string, object: ListableObject): Observable<boolean> {
|
||||
return this.getSelectableList(id).pipe(
|
||||
filter((state: SelectableListState) => hasValue(state)),
|
||||
map((state: SelectableListState) => isNotEmpty(state.selection) && hasValue(state.selection.find((selected) => selected.equals(object)))),
|
||||
startWith(false),
|
||||
map((state: SelectableListState) => hasValue(state) && isNotEmpty(state.selection) && hasValue(state.selection.find((selected) => selected.equals(object)))),
|
||||
distinctUntilChanged()
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user