Closed qti3e closed 7 years ago
Hello, everyone. I'm just wondering is there any existing API for opening context menu programmatically? Something like:
menuOptions = [ [function ($itemScope, $event, modelValue) { return $itemScope.item.name; }, function ($itemScope, $event, modelValue) { // Action }, function($itemScope, $event, modelValue) { // Enable or Disable return true; // enabled = true, disabled = false }] ]; $scope.open = function(){ // code to open context menu }
Thanks for your helping :-)
Can anyone help me? please
You can do so by triggering the event that the context menu is attached to. Something like:
var event = jQuery.Event("contextmenu", {}); $element.trigger(event);
Hello, everyone. I'm just wondering is there any existing API for opening context menu programmatically? Something like:
Thanks for your helping :-)