How can I send data from MudDialog
(child) back to the component that instantiates the dialog (parent).
Sample class:
class Data
{
string Name;
int age;
}
How can I send data from MudDialog
(child) back to the component that instantiates the dialog (parent).
Sample class:
class Data
{
string Name;
int age;
}
Copyright © 2021 Jogjafile Inc.
When you close the Dialog component using
MudDialog.Close<T>()
You can return aT
object from the dialog.CustomDialog.razor
Then in the page/component you show the dialog you can use the
DialogService.GetReturnValueAsync<T>()
method to get the returned object.Page.razor
Have a look at this MudBlazor Snippet