Fix sidebar node reloading issue (#2866)

[ADF-2186] Fix sidebar node reloading issue
This commit is contained in:
Popovics András
2018-01-23 14:48:00 +00:00
committed by Eugenio Romano
parent 4e434f7e11
commit c66115fe70
2 changed files with 11 additions and 1 deletions

View File

@@ -267,6 +267,16 @@ export class ViewerComponent implements OnChanges {
}
}
toggleSidebar() {
this.showSidebar = !this.showSidebar;
if (this.showSidebar && this.fileNodeId) {
this.apiService.getInstance().nodes.getNodeInfo(this.fileNodeId)
.then((data: MinimalNodeEntryEntity) => {
this.sidebarTemplateContext.node = data;
});
}
}
private getDisplayName(name) {
return this.displayName || name;
}