protected async Task OnClickHandler(MouseEventArgs ev) { if (Disabled) { return; } MudMenu.CloseMenu(); if (Link != null) { if (string.IsNullOrWhiteSpace(Target)) { UriHelper.NavigateTo(Link, ForceLoad); } else { await JsApiService.Open(Link, Target); } } else { await OnClick.InvokeAsync(ev); if (Command?.CanExecute(CommandParameter) ?? false) { Command.Execute(CommandParameter); } } }
protected async Task OnClickHandler(MouseEventArgs ev) { MudMenu.CloseMenu(); if (Link != null) { if (string.IsNullOrWhiteSpace(Target)) { UriHelper.NavigateTo(Link, ForceLoad); } else { await JsRuntime.InvokeAsync <object>("open", Link, Target); } } else { await OnClick.InvokeAsync(ev); if (Command?.CanExecute(CommandParameter) ?? false) { Command.Execute(CommandParameter); } } }