Skip to main content

defaultMenuOptions

Description

An array of objects with default configuration parameters for context menu items

Default config

defaultMenuOptions = [
{
id: "add:before",
text: "Add before",
icon: "wxi-table-row-plus-before",
},
{
id: "add:after",
text: "Add after",
icon: "wxi-table-row-plus-after",
},
{ id: "copy", text: "Copy", icon: "wxi-content-copy" },
{ type: "separator" },
{ id: "delete", text: "Delete", icon: "wxi-delete-outline" },
];

Parameters

The array contains objects with the next parameters for each menu item:

  • id - the id of a menu item
  • text - the text for an item
  • icon - the name of an icon displayed before the text. It converts to adding "i class={item.icon}", so any icons with the wxi- prefix can be used here, e.g ".wxi-plus" or any customer icons defined on the page.
  • type - the type of an item. It can be a "separator" or a custom type registered as a menu item (e.g. type:"button)
  • data - an array of sub items for a menu item.

Please, also refer to ContextMenu options.


Related articles: