[ADF-2032] viewer reopening fixes (#2739)

* viewer reopening fixes

* docs update
This commit is contained in:
Denys Vuika
2017-11-27 22:41:10 +00:00
committed by Eugenio Romano
parent 82dca30d7f
commit 2746b29984
8 changed files with 99 additions and 21 deletions

View File

@@ -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