# ContextMenuContext

Fields, allowed values, and APIs that use ContextMenuContext.

Canonical: https://grid.syidax.com/docs/types/ContextMenuContext/

<a id="definition"></a>

## Type definition

A question mark (?) marks an optional field; readonly marks a value you should not change directly. A union (|) accepts one of the listed forms. Functions are callbacks that Grid invokes at the relevant point.

```typescript
export interface ContextMenuContext<TRow = Record<string, unknown>> {
  rowIndex: number;
  field?: string;
  row?: TRow;
  columns: ReadonlyArray<ColumnDef>;
  rows: ReadonlyArray<TRow>;
}
```

<a id="used-by"></a>

## APIs using this type

- [contextMenuItemsCallback](https://grid.syidax.com/docs/options/contextMenuItemsCallback.md) — Returns cell context-menu items. Replaces the entire default list rather than appending to it.

<a id="parents"></a>

## Contracts containing this type

- [ContextMenuItem](https://grid.syidax.com/docs/types/ContextMenuItem.md)

<a id="related"></a>

## Related types

- [ColumnDef](https://grid.syidax.com/docs/types/ColumnDef.md)
