Why is the _dialogService.OpenAsync not awaited?
private async Task AddClick(MouseEventArgs e)
{
var newCustomer = new Customer();
var dialogResult = await _dialogService.OpenAsync<CustomerDialog>($"Create",
new Dictionary<string, object>() { { "Customer", newCustomer } },
new DialogOptions() { Width = "750px", Height = "Auto" });
if (IsOkPressed(dialogResult))
{
await _customerFactory.CreateCustomer(newCustomer);
await _customerFactory.RefreshCustomers();
}
}
If hooking up to the events
_dialogService.OnOpen += Open;
_dialogService.OnClose += Close;
I can see that I get an close event when the dialog is shown and a second one when the dialog is closed.