mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-06-30 18:15:11 +00:00
Fix sidebar node reloading issue (#2866)
[ADF-2186] Fix sidebar node reloading issue
This commit is contained in:
parent
4e434f7e11
commit
c66115fe70
@ -84,7 +84,7 @@
|
|||||||
matTooltip="{{ 'ADF_VIEWER.ACTIONS.INFO' | translate }}"
|
matTooltip="{{ 'ADF_VIEWER.ACTIONS.INFO' | translate }}"
|
||||||
data-automation-id="toolbar-sidebar"
|
data-automation-id="toolbar-sidebar"
|
||||||
[color]="showSidebar ? 'accent' : 'default'"
|
[color]="showSidebar ? 'accent' : 'default'"
|
||||||
(click)="showSidebar = !showSidebar">
|
(click)="toggleSidebar($event)">
|
||||||
<mat-icon>info_outline</mat-icon>
|
<mat-icon>info_outline</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
@ -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) {
|
private getDisplayName(name) {
|
||||||
return this.displayName || name;
|
return this.displayName || name;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user