Search code examples
javascriptjqueryhtmlcsshandsontable

How create a submenu in a contextmenu handsontable?


How create a submenu in a contextmenu handsontable?

I try the next fiddle:

$("#exampleGrid").handsontable({
    ...
    contextMenu: {
        callback: function(key, options) {
            var m = "clicked: " + key;
            window.console && console.log(m) || alert(m); 
        },
        items: {
            "edit": {"name": "Edit", "icon": "edit"},
            "fold1a": {
                "name": "Other group", 
                "items": {
                    "fold1a-key1": {"name": "echo"},
                    "fold1a-key2": {"name": "foxtrot"},
                    "fold1a-key3": {"name": "golf"}
                }
            }
        }
    }
});

http://jsfiddle.net/MrRino/v99N4/1/

But don't show the submenu.


Solution

  • may be you will see there: https://github.com/handsontable/jquery-handsontable/issues/1649 (Released in 0.11.0)