Interface: IContextMenuItemConfig

The options for a item in a Context Menu. It encapsulates the jquery-context-menu option.

Properties

childItems?

optionalchildItems: IContextMenuItemConfig[]

Child items

These are displayed on the right when a user hovers over this item


disabled?

optionaldisabled: boolean

When set to true this will disable and gray out the item


icon?

optionalicon: string

The name of the icon that will display for the item


onBuildCallback()?

optionalonBuildCallback: (contextMenuOptions, reviewData, api) => ContextMenuOption

Callback invoked when the IContextMenu is built

The item will not show up in the IContextMenu if this returns null. Use this callback to decide when to show the item in the menu, or change components of the option on the fly. For instance, you could disable the item on specific conditions. The callback will have access to some useful data on reviewData like documentId or workspaceId. It will also have access to the full public API.

Parameters

contextMenuOptions: ContextMenuOption

reviewData: IContextMenuReviewData

api: IReviewInterfaceApi

Returns

ContextMenuOption


onClickCallback()?

optionalonClickCallback: (reviewData, api) => void

Callback invoked when the item is clicked

The callback will have access to some useful data on reviewData like documentId or workspaceId. It will also have access to the full public API.

Parameters

reviewData: IContextMenuReviewData

api: IReviewInterfaceApi

Returns

void


order?

optionalorder: number

Order in the list of context menu items


permissionCheck?

optionalpermissionCheck: IPermissionCheckRequest

Permission Check object


rwcIcon?

optionalrwcIcon: string

The name of the RWC icon that will display for the item

Note that if icon is also set, rwcIcon will be ignored


rwcIconClass?

optionalrwcIconClass: string

Class that will be applied to rwcIcon, if set


rwcIconColor?

optionalrwcIconColor: string

Color that will be applied to rwcIcon, if set


text

text: string

The text that will display for the item


visible?

optionalvisible: boolean

When set to false this will hide the item