mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-09-17 14:21:14 +00:00
[ACA-92] Context Menu - share settings action (#699)
* context menu share settings action * update cspell with 'qshare' * share/edit share in viewer * force change detection on children * cleanup module declarations * detection only for preview page * assert properties * cast to boolean
This commit is contained in:
committed by
Denys Vuika
parent
8d28838de4
commit
f44b3629e9
@@ -27,7 +27,9 @@ import {
|
||||
Component,
|
||||
ViewEncapsulation,
|
||||
ChangeDetectionStrategy,
|
||||
Input
|
||||
Input,
|
||||
DoCheck,
|
||||
ChangeDetectorRef
|
||||
} from '@angular/core';
|
||||
import { ContentActionRef } from '@alfresco/adf-extensions';
|
||||
|
||||
@@ -38,7 +40,7 @@ import { ContentActionRef } from '@alfresco/adf-extensions';
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
host: { class: 'aca-toolbar-action' }
|
||||
})
|
||||
export class ToolbarActionComponent {
|
||||
export class ToolbarActionComponent implements DoCheck {
|
||||
@Input()
|
||||
type = 'icon-button';
|
||||
|
||||
@@ -47,4 +49,14 @@ export class ToolbarActionComponent {
|
||||
|
||||
@Input()
|
||||
actionRef: ContentActionRef;
|
||||
|
||||
constructor(private cd: ChangeDetectorRef) {}
|
||||
|
||||
// todo: review after ADF 2.6
|
||||
// preview component : change detection workaround for children without input
|
||||
ngDoCheck() {
|
||||
if (this.actionRef.id.includes('app.viewer')) {
|
||||
this.cd.markForCheck();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user