撤消自定义的动手动作

时间:2017-01-27 08:34:15

标签: javascript handsontable

我在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)});

我希望有可能撤消此自定义操作。如果可能的话怎么做?

0 个答案:

没有答案