tui.grid icon indicating copy to clipboard operation
tui.grid copied to clipboard

How to open context menu on click

Open arjanterheegde opened this issue 1 year ago • 2 comments

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
                },
            },


image

arjanterheegde avatar Mar 30 '23 08:03 arjanterheegde

Anyone?

arjanterheegde avatar Apr 17 '23 19:04 arjanterheegde

this event → toast-contextMenu plugin https://ui.toast.com/tui-context-menu

YounghoonYoo avatar Dec 03 '23 14:12 YounghoonYoo