Exploring the usage of Angular Material Dialog or any other Popup Window Component. The functionality is mostly working as expected, with the exception of the last point.
a) The original screen should not have a grey overlay,
b) Users should be able to interact with the underlying first window,
c) Data should be sent back to the original window component,
d) There should be support for moving the modal/popup window to a second monitor screen with dual monitors. This feature is currently not functioning properly.
Ideally, it should behave like a standard popup window. How can this be achieved using Angular Material Dialog?
public openPropertySearchDialog(): void {
const propertySearchDialogRef = this.openPropertySearchDialog.open(DocumentPropertyGridComponent, {
width: '800px',
height: '450px',
disableClose: true,
autoFocus: false,
data: "test",
hasBackdrop: false
});
propertySearchDialogRef.afterClosed().subscribe(result => {});
}
While we could use javascript's window.open function, we prefer Angular Material due to its comprehensive data binding communication service. If there are other Angular options available, those would also be suitable solutions.
The basic flow involves a user clicking on Component 1: "Add Document", where the variable
selectedDocumentList: Array<string>
gets passed to Component 2: cumulativeDocumentList: Array<string>
. The cumulative list should update in real-time, and we want to achieve this functionality using Angular Material Window Dialog.
(click picture to zoom in)
https://i.sstatic.net/dPrMc.png
Resource:
How can i make a MatDialog draggable / Angular Material