Open arjanterheegde opened 1 year ago
Is there a way to open the context menu by a left click on a button (see screenshot)? I've added a custom renderer and want to open the context menu when a user clicks on it. Can someone tell me how to do this?
class contextMenuRenderer { constructor(props) { const el = document.createElement('i'); el.setAttribute("aria-hidden", "true"); // onclick open context menu. this.el = el; this.render(props); } getElement() { return this.el; } render(props) { this.el.className = "ms-Icon ms-Icon--ExpandMenu suggestions-icon"; } } Header: { header: " ", name: "contextmenu", width: 25, renderer: { type: contextMenuRenderer }, },
Anyone?
this event → toast-contextMenu plugin https://ui.toast.com/tui-context-menu
Is there a way to open the context menu by a left click on a button (see screenshot)? I've added a custom renderer and want to open the context menu when a user clicks on it. Can someone tell me how to do this?