API REFERENCE

contextMenuItemsCallback

Returns cell context-menu items. Replaces the entire default list rather than appending to it.

What does this API do?

Returns cell context-menu items. Replaces the entire default list rather than appending to it.

API for Pro features: Built-in context menu

Exact input and result types

typescript
contextMenuItemsCallback: (
    ctx: ContextMenuContext<GridRow>,
  ) => ContextMenuItem<GridRow>[]
ItemValue
JavaScript namecontextMenuItemsCallback
HTML attributecontext-menu-items-callback
Defaultundefined
Input type( ctx: ContextMenuContext<GridRow>, ) => ContextMenuItem<GridRow>[]

Usage flow

Set this on a property of the Grid element. Pass arrays, objects, and callbacks through JavaScript, and use new arrays or objects when applying changes.

Read related types

Feature explanations and examples