Typed contract
API reference
Search every public table prop and column setting. Defaults and mode constraints reflect the current TypeScript implementation in src/Datatable.
125 documented entries
T[]Complete local row array. Sorting and filtering run in the client worker.
ColumnSetting<T>[]Column definitions controlling values, layout, rendering, and editing.
(nextRows: T[]) => voidReceives the next local row array after edits, imports, or row actions.
numberDefault virtualized body-row height in pixels.
numberLeaf header-row height in pixels.
numberTotal table height including title, toolbar, header, body, and footer.
numberExtra rows rendered beyond the visible viewport.
numberExtra columns rendered beyond the visible viewport.
stringAdditional class applied to the table root for layout or token overrides.
StyleResolver<RowStyleContext<T>>Static or conditional appearance style applied across each rendered row by stable base-row identity.
ConditionalFormatRule<T>[]Spreadsheet-style conditional formatting rules layered after rowStyle and cellStyle.
"table" | "spreadsheet"Selects standard data-table chrome or Excel-like presentation defaults.
booleanOverrides the mode default for the title strip.
booleanOverrides action-toolbar visibility. Spreadsheet mode uses the compact action-only variant.
booleanShows the active-cell address and raw value editor.
booleanShows the global row filter/search input. Defaults on in table mode and off in spreadsheet mode.
booleanShows per-column sort, filter, alignment, and pin menus.
booleanShows the keyboard-shortcuts help trigger without disabling the shortcuts themselves.
"light" | "dark"Visual theme applied through the data-dt-theme attribute.
ReactNodeFull-width title rendered above the toolbar.
booleanShows a translucent loading layer over the grid body.
booleanTemporarily blocks row, header, and footer selection interactions.
booleanDefers rich custom cell JSX through the frame scheduler by default.
booleanEnables drag resize handles in column headers.
booleanDeprecated alias for enableColumnResizing.
"deferred" | "live"Deferred shows a tinted width preview and commits on pointerup; live updates widths while dragging.
booleanEnables horizontal drag-and-drop column reordering.
booleanEnables configured pinning and pin controls globally.
booleanEnables sorting globally and overrides per-column sorting capabilities when false.
booleanBest-effort visible-row motion after sorting. Automatically skips reduced motion, scrolling, editing, and dense virtual windows.
booleanEnables global row filtering and its search control.
booleanEnables the column settings drawer for visibility, order, pinning, and alignment.
TableColumnPinningControlled left and right pin lists. Overrides column pinned seeds.
(pinning: TableColumnPinning) => voidReports controlled or uncontrolled pinning changes.
(sizing: Record<string, number>) => voidReports the current uncontrolled column width map.
(order: string[]) => voidReports the current uncontrolled column order.
(settings: ColumnLayoutSettings) => voidReports a unified snapshot after user-driven layout changes.
ColumnLayoutSettingsControlled live column layout for order, visibility, pinning, sizing, alignment, and formatting.
ColumnLayoutSettingsSeeds order, visibility, pinning, sizing, and alignment on mount.
booleanEnables toolbar find/replace separate from global row filtering.
booleanEnables spreadsheet-style address navigation such as C12.
(filters: ColumnFilter[]) => voidReports active per-column filters.
numberTotal number of rows in a host-controlled ordered result set.
(index: number) => T | undefinedReads a row from the host cache by current visual index.
numberSignals that host-cached row values or ordering changed.
(start: number, end: number) => voidReports the visible window so the host can fetch or prefetch rows.
(start: number, end: number) => voidReports the end-exclusive visible center-column range for horizontal prefetch or sheet growth.
(sort: { id: string | null; desc: boolean }) => voidReports requested sorting for the host to apply.
(query: string) => voidReports the requested global filter for the host to apply.
{ id: string | null; desc: boolean }Host-synchronized sort state displayed by the table.
stringHost-synchronized global filter text.
ColumnFilter[]Host-synchronized per-column filters.
booleanShows the pagination footer and applies page boundaries.
{ pageIndex: number; pageSize: number }Controlled pagination state.
OnChangeFn<PaginationState>Handles controlled pagination value or updater changes.
(pageIndex: number) => voidReports page-index changes through a direct callback.
(pageSize: number) => voidReports page-size changes through a direct callback.
readonly number[]Values shown in the footer's Rows selector.
booleanAdds row checkboxes and row-selection behavior.
booleanAllows more than one row to be selected.
(selection: Record<string, boolean>) => voidReports the base-index selection map.
(selectedRows: T[]) => voidReports selected row objects.
Array<number | T>Controlled selected identities as base indexes or row objects.
Array<number | T>Rows excluded from selection, addressed by base index or object identity.
keyof TBoolean row field used to render persistent, inert soft-deleted tombstones.
(row: T, baseIndex: number, event: MouseEvent) => voidReports clicks on eligible row surfaces and activates full-row highlighting.
(row: T, baseIndex: number, event: MouseEvent) => voidReports double-clicks on eligible row surfaces while preserving cell editing.
booleanShows the Excel-style row-number gutter.
booleanEnables active-row rail and tint feedback.
number | TControlled active row identity as a base index or row object.
booleanEnables inline editing for columns that define an editor.
booleanEnables spreadsheet-like cell focus and range selection.
[number | T, number]Controlled single cell as row identity and visible column index.
{ start: Cell; end: Cell }Controlled rectangular cell range.
(range: CellRange) => voidReports the selected cell bounds using base row and column indexes.
numberMaximum undo entries retained for edits.
numberMaximum redo entries retained for edits.
booleanShows the download action in the toolbar.
booleanDeprecated alias for enableDownload.
booleanShows the CSV/XLSX upload action in the toolbar. Virtual tables also need onUploadRows.
booleanDeprecated alias for enableUpload.
stringPrefills the export filename without an extension.
"csv" | "xlsx"Prefills the selected export format.
numberAdvertised total for an all-rows export, including remote datasets.
numberRow count at which export requests confirmation.
(context: ExportContext) => ExportRowsResult<T>Supplies an array or async stream of row chunks for cancellable background export.
numberMaximum rows mapped per export chunk.
numberDeprecated. Excel export is no longer row-limited.
XlsxAdapterOptional custom adapter for Excel import/export. Export loads the built-in adapter on demand when omitted.
(state: ExportState) => voidReports export preparation, progress, completion, cancellation, and errors.
(rows: T[]) => void | Promise<void>Receives parsed and validated upload rows for a virtual host to merge into its remote view.
booleanEnables right-click insert and delete actions for local rows.
(index: number) => TCreates a typed row for insertion at the requested local index.
(edits: Array<{ rowIndex: number; patch: Partial<T> }>) => voidDelivers virtual-mode cell patches for the host cache or store.
stringStable public column identifier used by state, callbacks, and raw row lookup.
stringOptional legacy/raw field name retained for compatible definitions.
stringVisible leaf header label.
stringShared label spanning adjacent columns with the same group title.
numberInitial numeric order priority. Ordered columns render before unordered columns.
numberInitial column width in pixels.
numberMinimum width allowed during layout and resize.
numberMaximum width allowed during layout and resize.
booleanColumn-level visibility seed. Derive this from external state for conditional column visibility.
"left" | "center" | "right"Horizontal alignment for the header label and body content.
"left" | "center" | "right"Overrides horizontal alignment for the header label only.
(row: T) => unknownDerives the column value when direct row[id] lookup is insufficient.
(context: CellRenderContext<T>) => ReactNodeRenders rich custom cell content from the resolved value and row.
StyleResolver<CellStyleContext<T>>Static or conditional appearance style for cells in this column.
DisplayFormatFormats default cell display without mutating raw row data.
(row: T) => unknownDerives the value used by global search and custom-cell match ranges.
booleanIncludes this column in global filtering.
booleanDeprecated alias for enableGlobalFilter.
booleanOverrides table-level deferred rendering for this column's custom cell JSX.
booleanAllows header-click sorting for this column.
"left" | "right"Seeds uncontrolled pinning on the specified edge.
"text" | "number"Selects the operator set used by the column filter UI.
booleanAllows this column to resize when table resizing is enabled.
booleanAllows this column to move when table reordering is enabled.
CellEditorType | CellEditorConfigSelects and configures the built-in inline editor.
(context: CellEditRenderContext<T>) => ReactNodeRenders a custom editor and takes precedence over the built-in editor.
numberTemporarily expands the virtualized row while this column is editing.
booleanLets Enter or Space toggle boolean content without opening an editor.
(zod: typeof z) => ZodTypeBuilds the Zod schema used to validate imported and edited values.
(row: T) => unknownReturns the scalar value written for custom cell content during export.
Supporting contracts
Public types
Useful signatures for integration. See examples and guides for working usage.
ColumnLayoutSettings
{ order, visibility, pinning, sizing, alignment }Serializable snapshot of the user-controlled column workspace.
TableColumnPinning
{ left: string[]; right: string[] }Controlled left and right pinned column identifiers.
ColumnFilter
{ id, op, value?, valueTo? }One active column filter, combined with other filters using AND.
CellEditorType
"text" | "number" | "textarea" | …Built-in editor names, including select, checkbox, date, time, radio, and range.
CellRenderContext<T>
{ row, value, rowIndex, baseIndex, colId, commitValue? }Values and actions available to a custom cell renderer.
CellEditRenderContext<T>
CellRenderContext<T> + commit/cancelEditing lifecycle actions supplied to a custom editor renderer.
ExportContext
{ kind: "selection" | "all" }Identifies whether an export should stream the selection or all rows.
XlsxAdapter
{ readWorkbook, writeWorkbook }Optional Excel adapter; omit to use the built-in lazy loader.
Exercise sorting, filtering, pagination, selection, and visibility →Read integration guides →