I am trying to customize the actions menu of an interactive grid, by hiding actions I don't need and adding my own custom actions. I've faced two problems doing this.
- I'm able to hide actions in the menu, but not the sub-menu/folder if it's empty.

- I've used the following code to add a custom action, but it doesn't show up in the actions menu
function( options ) {
options.initActions = function( actions ) {
actions.add( {
name: "my-action",
label: "Hello",
action: function( event, focusElement ) {
alert( "Hello World!" );
}
} );
};
return options;
}
Is there any way to hide empty sub-mnenu's? And what am I missing in terms of adding the custom action