TanStack compatibility

DataGrid TanStack Table v8 feature support matrix

TanStack Table version

DataGrid is built on TanStack Table v9. The v9 packages are peer dependencies, so your application controls the exact version:

yarn add @tanstack/react-table @tanstack/match-sorter-utils

Feature support

FeatureStatusHow to use
SortingBuilt-inenableSorting: true on columns
Column FilteringBuilt-inenableColumnFilter / filterFn on columns, state through the store
Global FilteringBuilt-inwithGlobalFilter or controlled state
PaginationBuilt-inpageSize, manualPagination or controlled state
Column SizingBuilt-inwithColumnResizing or controlled state
Column ResizingBuilt-inwithColumnResizing, columnResizeMode
Column PinningBuilt-incolumnPinning state (start / end)
Row PinningBuilt-inrowPinning state
Column OrderingBuilt-inwithColumnReorder or controlled state
Column VisibilityBuilt-inwithColumnVisibility or controlled state
Row SelectionBuilt-inwithRowSelection or controlled state
Row ExpansionBuilt-inwithRowExpansion or controlled state
GroupingBuilt-ingrouping state
AggregationBuilt-inaggregationFn on a column definition
FacetingBuilt-inwithFaceting: true
Tree DataBuilt-ingetSubRows
Cell SelectionBuilt-inwithCellSelection: true
Cell SpanningBuilt-inspanRows / spanColumns on a column definition
Row VirtualizationBuilt-invirtualize="rows"
Column VirtualizationBuilt-invirtualize="columns"
Row ReorderingBuilt-inwithRowReorder: true
EditingGrid featureeditingMode in useDataGrid, registered as editingFeature
Custom Sort FunctionsPer columnsortFn on a column definition
Custom Filter FunctionsPer columnfilterFn on a column definition
Debug ModeVia tableOptionstableOptions: { debugTable: true }

Bound types

TanStack Table v9 types take the registered feature set as their first generic argument. DataGrid exports aliases that are already bound to its feature set:

DataGrid aliasTanStack equivalent
DataGridColumnDef<TData>ColumnDef<DataGridFeatures, TData>
DataGridTable<TData>Table<DataGridFeatures, TData>
DataGridRow<TData>Row<DataGridFeatures, TData>
DataGridCell<TData>Cell<DataGridFeatures, TData>
DataGridColumn<TData>Column<DataGridFeatures, TData>
DataGridFilterFn<TData>FilterFn<DataGridFeatures, TData>
DataGridSortFn<TData>SortFn<DataGridFeatures, TData>
import { DataGridColumnDef, DataGridFilterFn } from '@mantine/data-grid';

const columns: DataGridColumnDef<Person>[] = [{ accessorKey: 'name', header: 'Name' }];

const exactMatch: DataGridFilterFn = (row, columnId, filterValue) =>
  String(row.getValue(columnId)) === filterValue;

To build TanStack types by hand, use the dataGridFeatures value and the DataGridFeatures type.

Features and row models

In v9, features and row models are registered explicitly instead of getXRowModel options. DataGrid registers the full feature set and all row models on every table. Features you do not use are bypassed with the manual* options.

Editing feature

Inline editing is a TanStack Table feature, editingFeature, registered on every DataGrid table. It adds the editing state with the onEditingChange option and the following APIs:

  • Table: startEditing, saveEditing, cancelEditing, setEditing
  • Row: getCanEdit, getIsEditing, getIsSaving, startEditing, saveEditing, cancelEditing
  • Column: getCanEdit
  • Cell: getCanEdit, getIsEditing, getEditingValue, setEditingValue, getEditingError

The types are added to @tanstack/table-core with module augmentation, so the package must be resolvable from your project. editingFeature is exported for tables built by hand with useTable.

Utility columns

The grid injects display columns for its own features, their ids are exported as UTILITY_COLUMN_IDS:

IdInjected bymeta.utility
__reorder__withRowReorderreorder
__select__withRowSelectionselect
__expand__withRowExpansion (without tree data)expand
__rowNumber__withRowNumbersrowNumber

Utility columns are regular TanStack columns included in table.getAllColumns(), header groups and columnOrder. If your code iterates columns (a custom visibility menu, an export), skip columns with meta.utility.

The store keeps utility columns first in columnOrder and columnPinning.start. If you control these slices with tableOptions.atoms, include the utility column ids in the atom value yourself.

Using tableOptions

Any TanStack Table option not exposed by useDataGrid can be passed through tableOptions:

const store = useDataGrid({
  data,
  columns,
  tableOptions: {
    enableMultiSort: true,
    maxMultiSortColCount: 3,
    sortDescFirst: false,
    debugTable: process.env.NODE_ENV === 'development',
  },
});

Accessing table state

TanStack Table v9 replaced table.getState() with a store. Read state from table.store.state, or subscribe to a single slice with table.atoms:

const store = useDataGrid({ data, columns });

store.table.store.state.sorting;
store.table.atoms.sorting.get();

Commonly used slices are also available on the DataGrid store directly, for example store.getSorting() and store.getPagination().

Module format

TanStack Table v9 is published as ES modules only. Bundlers such as Vite, webpack and Next.js handle this transparently. If you consume DataGrid from CommonJS with a raw require(), you need Node 22.12 or newer (or 20.19+), where require() of an ES module is supported.