mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 18:14:17 +00:00
Merge pull request #2361 from nona-luypaert/issue-2337_fix-vocabulary-treeview-not-updating
Fix tree not updating when switching between "Browse by Vocabulary" pages
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
import { FlatTreeControl } from '@angular/cdk/tree';
|
import { FlatTreeControl } from '@angular/cdk/tree';
|
||||||
import { Component, EventEmitter, Input, OnDestroy, OnInit, Output } from '@angular/core';
|
import { Component, EventEmitter, Input, OnDestroy, OnInit, Output, OnChanges, SimpleChanges } from '@angular/core';
|
||||||
|
|
||||||
import { map } from 'rxjs/operators';
|
import { map } from 'rxjs/operators';
|
||||||
import { Observable, Subscription } from 'rxjs';
|
import { Observable, Subscription } from 'rxjs';
|
||||||
@@ -28,7 +28,7 @@ import { getFirstSucceededRemoteDataPayload } from '../../../core/shared/operato
|
|||||||
templateUrl: './vocabulary-treeview.component.html',
|
templateUrl: './vocabulary-treeview.component.html',
|
||||||
styleUrls: ['./vocabulary-treeview.component.scss']
|
styleUrls: ['./vocabulary-treeview.component.scss']
|
||||||
})
|
})
|
||||||
export class VocabularyTreeviewComponent implements OnDestroy, OnInit {
|
export class VocabularyTreeviewComponent implements OnDestroy, OnInit, OnChanges {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The {@link VocabularyOptions} object
|
* The {@link VocabularyOptions} object
|
||||||
@@ -322,4 +322,9 @@ export class VocabularyTreeviewComponent implements OnDestroy, OnInit {
|
|||||||
private getEntryId(entry: VocabularyEntry): string {
|
private getEntryId(entry: VocabularyEntry): string {
|
||||||
return entry.authority || entry.otherInformation.id || undefined;
|
return entry.authority || entry.otherInformation.id || undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ngOnChanges(changes: SimpleChanges): void {
|
||||||
|
this.reset();
|
||||||
|
this.vocabularyTreeviewService.initialize(this.vocabularyOptions, new PageInfo(), this.selectedItems, null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -782,6 +782,8 @@
|
|||||||
|
|
||||||
"browse.comcol.by.srsc": "By Subject Category",
|
"browse.comcol.by.srsc": "By Subject Category",
|
||||||
|
|
||||||
|
"browse.comcol.by.nsi": "By Norwegian Science Index",
|
||||||
|
|
||||||
"browse.comcol.by.title": "By Title",
|
"browse.comcol.by.title": "By Title",
|
||||||
|
|
||||||
"browse.comcol.head": "Browse",
|
"browse.comcol.head": "Browse",
|
||||||
@@ -804,6 +806,8 @@
|
|||||||
|
|
||||||
"browse.metadata.srsc.breadcrumbs": "Browse by Subject Category",
|
"browse.metadata.srsc.breadcrumbs": "Browse by Subject Category",
|
||||||
|
|
||||||
|
"browse.metadata.nsi.breadcrumbs": "Browse by Norwegian Science Index",
|
||||||
|
|
||||||
"browse.metadata.title.breadcrumbs": "Browse by Title",
|
"browse.metadata.title.breadcrumbs": "Browse by Title",
|
||||||
|
|
||||||
"pagination.next.button": "Next",
|
"pagination.next.button": "Next",
|
||||||
@@ -2826,6 +2830,8 @@
|
|||||||
|
|
||||||
"menu.section.browse_global_by_srsc": "By Subject Category",
|
"menu.section.browse_global_by_srsc": "By Subject Category",
|
||||||
|
|
||||||
|
"menu.section.browse_global_by_nsi": "By Norwegian Science Index",
|
||||||
|
|
||||||
"menu.section.browse_global_by_title": "By Title",
|
"menu.section.browse_global_by_title": "By Title",
|
||||||
|
|
||||||
"menu.section.browse_global_communities_and_collections": "Communities & Collections",
|
"menu.section.browse_global_communities_and_collections": "Communities & Collections",
|
||||||
|
Reference in New Issue
Block a user