Column Header Menu: Built-in Actions
Each column header has a menu trigger that opens a menu of built-in column actions: sort ascending, sort descending, clear sort, pin left, pin right, unpin, autosize, and hide column. A consistent, discoverable entry point for column operations means users do not need to learn a separate gesture for each one.
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
A 10-column, 200-row employee dataset in which every column shows a menu trigger icon in its header.
Expected behavior
Clicking the trigger opens a menu anchored to the header. Choosing an action applies it right away, closes the menu, and writes a line to the event log. A column whose menu is suppressed shows no trigger.
Planned API surface
columnDefs[].headerMenucolumnDefs[].suppressHeaderMenugridOptions.headerMenuTriggerapi.openHeaderMenu(colId)api.closeMenus()onHeaderMenuOpenonHeaderMenuCloseonHeaderMenuItemSelectAcceptance criteria
- The trigger is rendered on every column unless that column has suppressHeaderMenu set. (pending)
- Selecting 'Sort Descending' sorts the grid and updates the header's sort indicator. (pending)
- Selecting 'Pin Left' moves the column into the left pinned region. (pending)
- 'Unpin' is shown only when the column is pinned. (pending)
- 'Hide Column' removes the column from view, and the action is reported through onHeaderMenuItemSelect. (pending)
- Clicking outside the menu or pressing Escape closes it and returns focus to the header cell. (pending)
- api.openHeaderMenu(colId) opens the same menu programmatically. (pending)