Context Menu Technical Reference
Context Menu Options
ContextMenuOptions
Options for managing menus in AdapTable – provided using 2 collections
customContextMenu receives a CustomContextMenuContext:
CustomContextMenuContext
Context info provided when building Custom Context Menus
ContextMenuContext<TData>
Custom application Context provided in AdaptableOptions.adaptableContext
A menu entry the user supplies is a UserContextMenuItem:
UserContextMenuItem
Context Menu Item that is provided by User
boolean
Whether menu item is disabled
Optional Framework Component (React, Angular or Vue) used to render the
content of this menu item.
When supplied, AG Grid renders the component inside the menu row using
its own framework adapter. The component receives AG Grid'sCustomMenuItemProps, with the AdapTable-specific extras
(adaptableApi, menuContext, plus anything passed viamenuItemParams) available as props.menuItemParams.
Supported in the React, Vue and Angular variants of AdapTable.
For Vue, supply a factory that returns the Vue Component (NOT a render
call), e.g. ({ adaptableApi }) => MyMenuItem. AG Grid Vue then
instantiates the component using its own framework adapter and passesname, icon, menuItemParams, ... as props.
For Angular, supply { type: MyMenuItemComponent } where the component
implements IMenuItemAngularComp (with agInit(params) to receiveparams.menuItemParams.adaptableApi and params.menuItemParams.menuContext).
The onSetup callback on AngularFrameworkComponent is NOT honoured
for menu items because AG Grid owns the component lifecycle.
Optional icon to display
string
Text to appear in the Menu Item
(menuContext:ContextMenuContext) => void
Function invoked when the Menu Item is clicked
Context Menu API
ContextMenuApi
The right-click menu: the default items, and adding or removing items.