How to pass data to material dialog
Hi Team,
Iam using Datatable and material design for my app. I am struck with an issue. In the data table row on click of a data row column i need to open a dialog box where i can pass the elements of that row to that dialog box.Not sure how to implement this since material design won't accept other params when sending the request with data. Below is my configured code.
.ts:
handleSchedule(rowObj){ console.log(rowObj); let config=new MdDialogConfig(); config.viewContainerRef = this.viewContainerRef; this.dialogRef = this.dialog.open(OpenSchedule, config); } As mentioned above OpenSchedule is the other component which was configured and i need to use the value of rowObj in the OpenSchedule when dialogue box gets opened. Please let me know your thoughts.
Thanks.
I found out the solution.Thank you
Hi @vibingopal , What is your solution ? Thanks
I solved it like this: I have a ConfirmationDialog component, where I defined a public property "confirmationOptions" that can contain title and text for the dialog.
this.confirmationDialogRef = this.dialog.open(ConfirmationDialog, {
disableClose: false,
});
// this sets the public property of the dialog component instance
this.confirmationDialogRef.componentInstance = {
...
}
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.