Cheatsheets and messages
Props A to Z
Find a grid prop or column field by name, read what it does, and open the page that explains it.
Each table lists the props of one type in alphabetical order. Callbacks are on Events A to Z, and add-on options are on Options A to Z.
Provider props
Props of DataGrid, DataGridProvider.
| Prop | Purpose | Page |
|---|---|---|
announceResults | Announces the view's row count through the grid's live region after a filter, sort, or filter-group change. | Live region messages |
autosizeOnMount | Fits the column widths once after mount, when the view first has rows. | Column sizing |
cellTypes | Custom cell types keyed by ColumnDef.type. Built-in types that you do not name keep working. | CellType contract |
checkedRowsLifetime | How long the checked rows last. | Checked rows |
columnGroups | Shared headers above runs of columns, by column id. Groups nest. | Column headers and groups |
columnLayout | The layout that your code controls. | Column and viewport events |
columns | The column definitions of the grid. | Define columns |
commands | Your own keyboard commands, keyed by name. A keymap binding that names no built-in action runs one. | Plugin commands and shortcuts |
createRow | Builds the new row for insertRow and insertRows. Without it, both return the reason "no-factory". | Row operations |
data | The rows, controlled by your code. | Data change events |
defaultColumnLayout | The layout, seeded once at mount. | Column and viewport events |
defaultData | The rows, seeded once and then owned by the grid. | Data change events |
defaultExpanded | Seeds the open groups once at store creation. | DataGrid props |
defaultFilterJoin | The join of the top-level filters, seeded once. | Sort and filter events |
defaultFilterState | The filters, seeded once. | Sort and filter events |
defaultGroupBy | Seeds the group columns once at store creation. | DataGrid props |
defaultPage | Seeds the page of a paged grid once. Default 1. | Client pagination |
defaultPageSize | Seeds the page size once and turns paging on. The grid keeps all of data and shows one page of the view. | Client pagination |
defaultSearchText | The quick search text, seeded once. | Sort and filter events |
defaultSelection | The selection, seeded once. | Selection and cell events |
defaultSortState | The sort, seeded once. | Sort and filter events |
duplicateRow | Builds the new row for duplicateRows from the source row and its new data index. | Row operations |
enableColumnPinning | Turns on pinning grid-wide. Default true. false makes setColumnPin do nothing. | Column order and pinning |
enableColumnReorder | Enables drag-to-reorder columns grid-wide. Default true. false makes setColumnOrder do nothing. | Column order and pinning |
enableColumnResize | Enables the header resize handle grid-wide. Default true. | Column sizing |
enableColumnSelection | Turns on whole-column selection by a header click. Default true. | Pointer selection |
enableMultiRange | Turns on several ranges by Ctrl or Cmd click. Default true. | Pointer selection |
enableRangeSelection | Turns on range selection by shift-click, drag, and shift+arrow keys. Default true. | Pointer selection |
enableRowDelete | Whether the delete-rows key deletes. Default true. | Row operations |
enableRowSelection | Turns on whole-row selection by a row marker click and Shift+Space. Default true. | Row markers |
expanded | Controlled open groups. | DataGrid props |
fetchFilterValues | Supplies the values of the header filter popover and the isAnyOf input from a backend, one list per search. | Header filter |
filterJoin | The join of the top-level filters, controlled by your code. | Sort and filter events |
filterMode | Who filters: "client" filters data, "server" only tracks the filters. Default "server" with totalRowCount, else "client". | Sort and filter events |
filterState | The filter tree, controlled by your code. | Sort and filter events |
gateTimeoutMs | Aborts an async gate that has not settled after this many ms. Default: off. | Gate cancellation and timeouts |
getRowId | Stable, unique id of a row. | DataGrid props |
groupBy | Controlled group columns, outermost first. | DataGrid props |
groupLayout | The group rows of a server grid, laid out by the server hook. | DataGrid props |
groupMode | "server" shows the group rows of groupLayout and never buckets rows. | DataGrid props |
headerClickBehavior | Sets what a plain header click does. Default "select". | Pointer selection |
inputDebounceMs | Sets the wait in ms before a text input commits. It covers the toolbar search, the filter value inputs, the set-filter search, find and replace, and the lookup editor. | Quick search |
keymap | Merges over DEFAULT_KEYMAP per action. An action mapped to [] has no binding. | Shortcut remapping |
labels | Overrides the UI text. The grid deep-merges it over DEFAULT_LABELS. | Labels and i18n |
locale | BCP 47 language tag, such as "de-DE". | Labels and i18n |
page | The current page, 1-based. | Client pagination |
pageSize | Shows pageSize rows of the sorted and filtered view at a time. | Client pagination |
pageSizeOptions | Lists the page sizes that the footer select offers. DataGridPaginationBar and useDataGridPager read it, and an option on either wins. | DataGrid props |
plugins | Installs plugins: overlay layers, row bands, data-change observers, commands, keymap bindings, and root mounts. | Plugin model |
processCellForClipboard | Overrides a cell's clipboard-copy text. | Change copy and paste |
processCellFromClipboard | Overrides parsing pasted text into a cell value. | Change copy and paste |
processPaste | Runs on the parsed paste grid before it is applied. Returning false (or a promise of false) vetoes the paste entirely. | Change copy and paste |
readOnly | Blocks edits, paste, fill, cut, clear, row operations, id swaps, undo, and redo in the whole grid. A source: "stream" push still writes. Default false. | Editable columns |
resolveSaveConflict | Decides what a refused row becomes when the server sent its current row (SaveRejection.current). | Handle refused saves |
rowMarkers | Sets the mode of the marker column. Default "none". | Row markers |
sanitizeClipboardFormulas | Prefixes formula-like copied cells with ' in the clipboard text and HTML. Default true. false copies raw text. | Clipboard |
saveTimeoutMs | Refuses a save that has not settled after this many ms. | Data change events |
searchText | The quick search text, controlled by your code. | Sort and filter events |
selection | The selection, controlled by your code. | Selection and cell events |
sortLocale | The language tag for text compares in a client sort, text range filters, and the filter value lists. | Sort and filter events |
sortMode | Who sorts: "client" sorts data, "server" only tracks the sort. Default "server" with totalRowCount, else "client". | Sort and filter events |
sortState | The sort, controlled by your code. | Sort and filter events |
totalRowCount | Declares that data is a window of a larger result of this many rows. null means the size is unknown. | Server rows contract |
validateRow | Validates a whole row once after a write gesture commits. The row already has every cell of the gesture applied. | Row validation and async checks |
Root props
Props of DataGrid, DataGridRoot.
| Prop | Purpose | Page |
|---|---|---|
aria-label | Accessible name of the grid. | DataGrid props |
aria-labelledby | Id of the element that names the grid. | DataGrid props |
children | The parts inside the root. | DataGrid props |
className | Classes for the scroll root. | DataGrid props |
columnOverscan | Unpinned columns that render past each side of the view. | DataGrid props |
density | Row height preset: 28, 36, or 44 px. | DataGrid props |
direction | Layout direction. | DataGrid props |
emptyState | Content for a view with no rows. | DataGrid props |
error | Any value except undefined and null shows the error state. | DataGrid props |
errorState | Replaces the built-in error state. | DataGrid props |
getCellClassName | Adds classes to a cell. | DataGrid props |
getRowClassName | Adds classes to a row. | DataGrid props |
headerHeight | Height of one header row in px. | DataGrid props |
loading | Shows the loading skeleton or the loading bar. | DataGrid props |
loadingState | Replaces the built-in loading display. | DataGrid props |
markerWidth | Marker track width in px. It overrides the width of the rowMarkers mode. rowMarkers="none" ignores it. | DataGrid props |
renderGroupLabel | Renders the content of a group row label. The default is "column: key". | DataGrid props |
renderHeaderFilter | Renders the header filter in each column that offers a set filter (isAnyOf or isNoneOf) and is not filterable: false. | DataGrid props |
renderHeaderMenu | Renders a menu trigger in each header cell. | DataGrid props |
renderMarker | Replaces the content of a row marker cell. | DataGrid props |
renderMarkerHeader | Replaces the select-all checkbox of the marker header. | DataGrid props |
rowHeight | Row height in px. | DataGrid props |
Column fields
Props of ColumnDef.
| Prop | Purpose | Page |
|---|---|---|
accessorFn | Computes the value from the row. | ColumnDef |
accessorKey | Row field that holds the value. | ColumnDef |
aggregate | Reduces this column over each row group. The group row shows the result. | ColumnDef |
cellClassName | Adds classes to every cell of the column. | ColumnDef |
filter | Sets the filter capabilities of this column. | ColumnDef |
filterable | false removes the column from the filter column picker and the header filter. | ColumnDef |
flex | Share of the free width of the grid. | ColumnDef |
groupable | Lets the grid group by this column. | ColumnDef |
header | A string header shows a sort arrow while the column is sorted, also on a sortable: false column. | ColumnDef |
headerClassName | Adds classes to the header cell. | ColumnDef |
headerText | Plain-text name for a node header. | ColumnDef |
hideable | false turns off the column row in the columns menu while the column is visible and removes "Hide column" from the header menu. | ColumnDef |
id | Stable identity of the column. | ColumnDef |
maxWidth | Largest width in px. | ColumnDef |
minWidth | Smallest width in px. | ColumnDef |
options | Settings for the cell type, such as the choices of a select. | ColumnDef |
pin | Starting pin side, applied when the column id first appears. | ColumnDef |
pinnable | false turns off pin and unpin. | ColumnDef |
readOnly | Blocks edits. | ColumnDef |
renderCell | Replaces how the cell looks. | ColumnDef |
reorderable | false stops the drag of this column. | ColumnDef |
resizable | false removes the resize handle and leaves the column out of autosize. | ColumnDef |
setValue | Returns a new row with the value written. | ColumnDef |
sortable | false removes the column from header-click sorting, the sort list, and the sort items of the header menu. | ColumnDef |
sortCompare | Compares two rows for sorting. | ColumnDef |
sortIndicator | Draws the built-in sort arrow in the header, for string and node headers alike. | ColumnDef |
type | Key of the cell type. | ColumnDef |
validate | Rejects a value. | ColumnDef |
validateMany | Validates every cell of this column that one write sets in one call (null accepts), after validate. One answer per cell, in order. | ColumnDef |
validationMode | What a rejection does to a commit: a single-cell edit, a paste, a fill, updateCells, an import, Delete, and Cut. | ColumnDef |
width | Width in px. | ColumnDef |
Related
- DataGrid props: the props of DataGrid
- ColumnDef: the fields of ColumnDef
- Events A to Z: callbacks by name