我在handsontable
的上下文菜单中定义了自定义操作:
function contextMenu(hot){
var menu = {
callback: function (key, options) {
if (key === 'custom') {
setTimeout(function () {
myCustomAction(hot);
}, 100);
}
},
items: {
"commentsAddEdit": {},
"commentsRemove": {},
"hsep1": "---------",
"remove_row": {},
"custom" : {
name: "My custom action"
},
"hsep2": "---------",
"undo": {},
"redo": {}
}
};
return menu;
}
hot.updateSettings({contextMenu: contextMenu(hot)});
我希望有可能撤消此自定义操作。如果可能的话怎么做?