Here is my sample code. I created code here please see my working code here
I tried to set up a position for a dialog box
dialogConfig.position = { top: '370px',left: '500px'}
But for each row it's opening at the same position.
Here, I need to open a dialog box under each row on the Change Request button.
The below code is for the Dialog box
openDialog(Id, Currency, Amount, Reason, StatusDescription, payment) {
const dialogConfig = new MatDialogConfig();
dialogConfig.disableClose = true;
dialogConfig.autoFocus = true;
dialogConfig.data = {
Id: Id,
Reason: Reason,
StatusDescription: StatusDescription
};
dialogConfig.position = {
top: '370px',
left: '500px'
}
const dialogRef = this.dialog.open(EditingDialogComponent, dialogConfig);
dialogRef.afterClosed().subscribe(
data => {
console.log("Dialog output:", data)
}
);
}