Restores deleted nodes to their original location.
<adf-toolbar title="toolbar example">
<button mat-icon-button
[adf-restore]="documentList.selection"
(restore)="onRestore($event)">
<mat-icon>restore</mat-icon>
</button>
</adf-toolbar>
<adf-document-list #documentList
currentFolderId="-trash-" ...>
...
</adf-document-list>
onRestore(restoreMessage: RestoreMessageModel) {
this.notificationService
.openSnackMessageAction(
restoreMessage.message,
restoreMessage.action
)
.onAction()
.subscribe(() => this.navigateLocation(restoreMessage.path));
this.documentList.reload();
}
navigateLocation(path: PathInfoEntity) {
const parent = path.elements[path.elements.length - 1];
this.router.navigate(['files/', parent.id]);
}
| Name | Type | Default value | Description |
|---|---|---|---|
| selection | DeletedNodeEntry[] | Array of deleted nodes to restore. |
| Name | Type | Description |
|---|---|---|
| restore | EventEmitter<RestoreMessageModel> | Emitted when restoration is complete. |
The directive takes a selection of DeletedNodeEntry instances and restores them to
their original locations. If the original location doesn't exist anymore then they remain
in the trash list.
When you restore a single node, you can use the location property to show where the node has
been restored. The property specifies the route path where the list of nodes are rendered.
© 2023 Alfresco Software, Inc. All Rights Reserved.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.