mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-2032] viewer reopening fixes (#2739)
* viewer reopening fixes * docs update
This commit is contained in:
committed by
Eugenio Romano
parent
82dca30d7f
commit
2746b29984
@@ -67,6 +67,42 @@ Using with file url:
|
||||
| print | any | Yes | Raised when user clicks the 'Print' button. |
|
||||
| share | any | Yes | Raised when user clicks the 'Share' button. |
|
||||
|
||||
## Integrating with DocumentList component
|
||||
|
||||
Below is the most simple integration of Pagination and DocumentList components within your custom component:
|
||||
|
||||
```html
|
||||
<adf-document-list
|
||||
currentFolderId="-my-"
|
||||
(preview)="showPreview($event)">
|
||||
</adf-document-list>
|
||||
|
||||
<adf-viewer
|
||||
[(showViewer)]="showViewer"
|
||||
[overlayMode]="true"
|
||||
[fileNodeId]="nodeId">
|
||||
</adf-viewer>
|
||||
```
|
||||
|
||||
And the component controller class implementation can look like the following:
|
||||
|
||||
```ts
|
||||
export class OverlayViewerComponent {
|
||||
|
||||
@Input()
|
||||
showViewer: boolean = false;
|
||||
|
||||
nodeId: string;
|
||||
|
||||
showPreview(event) {
|
||||
if (event.value.entry.isFile) {
|
||||
this.nodeId = event.value.entry.id;
|
||||
this.showViewer = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Details
|
||||
|
||||
### Supported file formats
|
||||
|
Reference in New Issue
Block a user