ACS-8254 [ADF] Add functionality to pass data on confirmation in DialogComponent (#9845)

This commit is contained in:
Darya Blavanovich
2024-06-21 16:14:53 +02:00
committed by GitHub
parent 215b9c2e4b
commit 785b5821a0
6 changed files with 28 additions and 6 deletions

View File

@@ -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: {} }
}
```