WarUI

Per-Row Extensible Context Menu

GRID-A22-F04P0baselinePlanned

A callback builds the context menu items from the clicked row's data, the column, and the selection, so items can be added, disabled, or hidden per row. Row-specific actions such as 'Refund order' only make sense for certain records.

Planned. This page shows the specification from issue #202. The live example, source for every framework and the API reference replace it when the feature ships.

Live example

An orders grid where status values are mixed between pending, paid, and shipped.

Expected behavior

The menu content changes depending on the row's status. Disabled items are visible but cannot be activated, and they show their reason. Bulk actions report how many rows they will affect, for example 'Refund 3 orders'.

Planned API surface

gridOptions.getContextMenuItems(params)params.nodeparams.columnparams.selectedNodesMenuItemDef.disabledMenuItemDef.disabledReasonMenuItemDef.hiddenMenuItemDef.action

Acceptance criteria

  • The callback is invoked on every open and receives the clicked node, the column, and the selected nodes. (pending)
  • Items with hidden: true are not rendered. (pending)
  • Items with disabled: true have aria-disabled="true" and their action is never called. (pending)
  • disabledReason is exposed as a tooltip and as an accessible description. (pending)
  • An action receives the node(s) it applies to and the grid API. (pending)