Compositions
DataGridColumnHeader
Interactive column header for a DataGrid: click to cycle sorting, or open the
dropdown to sort, pin, move, and toggle column visibility. Reads DataGrid
context, so it must render inside a DataGrid provider.
Usage
Best practices
Render inside a
DataGrid- it callsuseDataGrid()and throws outside the provider; use it as a column def'sheader, not standalone.The pin/move/visibility controls only appear when the matching
tableLayoutflags (columnsPinnable/columnsMovable/columnsVisibility) are enabled onDataGrid- a missing menu item usually means the flag is off, not a bug.Pass a human
title(and optionalicon); it is the accessible label for the sort/menu trigger and the moved-column announcement.
Props
Also exports
- interface
DataGridColumnHeaderProps
Composition
Builds on