mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
ACS-8254 [ADF] Add functionality to pass data on confirmation in DialogComponent (#9845)
This commit is contained in:
committed by
GitHub
parent
215b9c2e4b
commit
785b5821a0
@@ -89,9 +89,12 @@ function openDialog() {
|
||||
title: 'Dialog title',
|
||||
contentComponent: ExampleDialogComponent,
|
||||
componentData: { nodeId: 'nodeId', name: 'node name' } // any data can be passed
|
||||
dataOnConfirm$: of({ nodeId, data: {} })
|
||||
};
|
||||
|
||||
this.dialog.open(DialogComponent, { data });
|
||||
const dialogInstance = this.dialog.open(DialogComponent, { data });
|
||||
|
||||
dialogInstance.afterClosed().subscribe((data) => data) // data = { nodeId, data: {} }
|
||||
}
|
||||
```
|
||||
|
||||
|
@@ -26,7 +26,8 @@ interface DialogData {
|
||||
descriptionTemplate?: TemplateRef<any>;
|
||||
headerIcon?: string;
|
||||
additionalActionButtons?: AdditionalDialogActionButton[];
|
||||
componentData: any;
|
||||
componentData?: any;
|
||||
dataOnConfirm$?: Subject<any>
|
||||
}
|
||||
```
|
||||
|
||||
@@ -50,6 +51,7 @@ interface DialogData {
|
||||
| descriptionTemplate | `TemplateRef<any>` | | Inserts a description template. (optional) |
|
||||
| additionalActionButtons | `AdditionalDialogActionButton[]` | | Inserts additional base-styled buttons into the action bar on the left. (optional) |
|
||||
| componentData | `any` | | Data that injected in contentComponent. (optional) |
|
||||
| dataOnConfirm$ | `Subject<any>` | | Data to be passed on confirm action after dialog closed. (optional) |
|
||||
|
||||
## See also
|
||||
|
||||
|
@@ -50,4 +50,4 @@ function openDialog() {
|
||||
|
||||
- [Dialog Component](../dialogs/dialog.md)
|
||||
- [Dialog Data Interface](../interfaces/dialog.interface.md)
|
||||
- [AdditionalDialogActionButton Interface](./additional-dialog-action-button.md)
|
||||
- [AdditionalDialogActionButton Interface](../interfaces/additional-dialog-action-button.interface.md)
|
||||
|
Reference in New Issue
Block a user