vitmalina / w2ui

UI widgets for modern apps. Data table, forms, toolbars, sidebar, tabs, tooltips, popups. All under 120kb (gzipped).
http://w2ui.com
MIT License
2.64k stars 730 forks source link

CustomContextMenu/w2menu problem after 1.5 => 2.0 migration #2451

Closed TheFast99 closed 11 months ago

TheFast99 commented 11 months ago

I'm on a Grid. I have a custom context menu that i try to show, it worked on 1.5. on 2.0 :

My code (I changed menu to contextMenu for 2.0) :

w2ui[gridName].contextMenu = data.displayContextMenu;

var obj = w2ui[gridName];
if (obj.contextMenu.length > 0) {
    $(obj.box).find(event.target)
        .w2menu(obj.contextMenu, {
            left: event.offsetX,
            onSelect: function (event) {
                obj.contextMenuClick(recid, 0, event);
            }
        }
    );
}
if (event.preventDefault) {
    event.preventDefault();
}

I have the master version. I think something is delay, is w2menu still working ?

Thanks