cellContextMenuItem
cellContextMenuItem<
TData,TArgs>(id,factory):CellContextMenuItemFactory<TData,TArgs>
Defined in: contextMenu.tsx:130
Helper function to create a cell context menu item with full context access.
The factory function receives context including the clicked cell, column, row, cell value, table instance, and plugin configuration args.
Type Parameters
Section titled “Type Parameters”TData
TArgs = unknown
Parameters
Section titled “Parameters”string
Unique identifier for the menu item
factory
Section titled “factory”(ctx) => ContextMenuItemEntry
Factory function that receives context and returns menu item entry
Returns
Section titled “Returns”CellContextMenuItemFactory<TData, TArgs>
Examples
Section titled “Examples”cellContextMenuItem("filter-by-value", (ctx) => ({ label: `Filter by "${ctx.value}"`, onClick: () => { ctx.column.setFilterValue(ctx.value); },}))cellContextMenuItem("copy-value", (ctx) => ({ label: "Copy value", onClick: () => navigator.clipboard.writeText(String(ctx.value)), visible: ctx.value != null,}))