onCommand

fires when selecting an option in a context menu, opening an external UI or dialog, updating a toolbar, or performing some action on a table

void onCommand(object command);
commandobjectthe action object

Example

webix.ready(function(){
  webix.ui({
    view:"spreadsheet",
    data:base_data,
    menu:[{ id: "new-option", value: "My option"}],
    on:{
      onCommand(obj) {
        if (obj.id === "new-option")
          webix.message("click on custom option");
      }
    }
  });
});

Back to top