public async Task ShowMenu(string id, string x, string y, string targetId = null, DotNetObjectReference <ContextMenuTrigger> trigger = null) { var menu = _contextMenuStorage.GetMenu(id); if (menu != null) { await menu.Show(x, y, targetId, trigger?.Value); } }
public async Task HideMenu(string id) { var menu = _contextMenuStorage.GetMenu(id); if (menu == null) { throw new Exception($"No context menu with id '{id}' was found"); } await _jSRuntime.InvokeVoidAsync("blazorContextMenu.Hide", id); }
public async Task ShowMenu(string id, int x, int y, object data) { var menu = _contextMenuStorage.GetMenu(id); if (menu == null) { throw new Exception($"No context menu with id '{id}' was found"); } menu.Data = data; await _jSRuntime.InvokeVoidAsync("blazorContextMenu.ManualShow", id, x, y); }