I am using Mudblazor in my Blazor app. I have the following code in a component inside ValidSubmit handler:
public async Task HandleValidSubmit()
{
DialogService.Show<SavingDialog>("Saving Data");
await Http.PostAsJsonAsync("api/Client/AddClient", CModel);
//close the dialog here...
//DialogService.Close(<need reference here>);
}
The DialogService opens the SavingDialog which is also a component. After the http call, I want to close the dialog. How do I do that? I can see the DialogService.Close(DialogReference dialog) in the documentation. How do I get reference to the dialog box that I opened so I can close it?
Thanks.