We have 1) Material Dialog Component Opening up 2) Another Material Dialog Component, when user press "Open Adv. Search" Button.
The first Dialog component is in fixed position. The second Dialog component is Movable, however cannot go behind first original one yet.
How to make it so, users can interchange the back or front positions of both windows, like typical Windows 10 desktop app, depending on what is clicked/drag/drop last?
Second Component:
public openAdvancedPropertySearchDialog(): void {
const advancedApnSearchDialogRef = this.advancedApnSearchDialog.open(DocumentPropertyGridComponent, {
width: '800px',
height: '450px',
disableClose: true,
autoFocus: false,
data: "test"
hasBackdrop: false
});
advancedApnSearchDialogRef.afterClosed().subscribe(result => {});
}
HTML Code for Second Component: which is Movable: First Component Dialog should be in fixed position ideally
<div mat-dialog-title cdkDrag cdkDragRootElement=".cdk-overlay-pane" cdkDragHandle>
<div class="row">
<button class="dialog-button close-button" mat-button (click)="onCancel()">X</button>
</div>
<app-document-property-grid></app-document-property-grid>
</div>
*If its only possible both components be movable with cdkDrag, rather than first Modal window being fixed, that can be accepted as answer .
Resource: