You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When I load the modal, the events you would expect fire. such as code behind SetParametersAsync, OnInitialized ,OnParametersSet and the linked viewmodel to fire the construct
When i close the modal, it fired them all again, have you even seen this issue please ?, we have just upgraded to .net8 Blazor Server
I call the modal with
var returnFilterData =
await _dialogManager.OpenInterfaceAsModalAsync<IGridFilterEditor_View, GridFilterEditor_Output>("", inputs);
public async Task<O> OpenInterfaceAsModalAsync<T, O>(string title = null, IEnumerable<KeyValuePair<string, object>> inputs = null)
{
var concreteImplementation = _serviceProvider.GetService<T>();
var concreteType = concreteImplementation.GetType();
return await OpenAsModalAsync<O>(concreteType, title, inputs);
}
public async Task<O> OpenAsModalAsync<O>(Type viewFragmentType, string title = null, IEnumerable<KeyValuePair<string, object>> inputs = null)
{
if (inputs == null)
inputs = new List<KeyValuePair<string, object>>();
// Params
var mp = new ModalParameters();
mp.Add("ViewFragmentType", viewFragmentType);
mp.Add("Inputs", inputs);
// Options
var mo = new ModalOptions { DisableBackgroundCancel = true, Position = ModalPosition.Middle , UseCustomLayout = true };
// Open the form
var modalForm = _modalService.Show<ModalHost_View>(title, mp, mo);
var modalResult = await modalForm.Result;
if (!(modalResult?.Confirmed ?? false)) return default;
if (modalResult.Data == null) return default;
if (modalResult.Data is not O) return default;
return (O)modalResult.Data;
}
The text was updated successfully, but these errors were encountered:
Describe the bug
When I load the modal, the events you would expect fire. such as code behind SetParametersAsync, OnInitialized ,OnParametersSet and the linked viewmodel to fire the construct
When i close the modal, it fired them all again, have you even seen this issue please ?, we have just upgraded to .net8 Blazor Server
I call the modal with
The text was updated successfully, but these errors were encountered: