Documentation Index
Fetch the complete documentation index at: https://mintlify.com/theopenlane/openlane-ui/llms.txt
Use this file to discover all available pages before exploring further.
Overview
The DataTable component is a feature-rich table for displaying and managing tabular data. It supports sorting, filtering, column visibility, pagination, and column resizing.Import
Usage
Props
Array of column definitions. Extends TanStack Table’s
ColumnDef with optional meta.className for styling.The data to display in the table.
Unique key for the table, used for persisting sorting and pagination state in localStorage.
Shows loading skeleton when true.
Shows a filter input for the ‘name’ column.
Shows a column visibility toggle dropdown.
Text to display when there are no results.
Custom markup to display when there’s no data.
Callback fired when a row is clicked.
Array of sortable field definitions.
Callback fired when sort conditions change.
Pagination configuration object. Set to
null to disable pagination.Callback fired when pagination changes.
Pagination metadata including totalCount, pageInfo, and isLoading.
Additional CSS classes for the wrapper div.
Column visibility state object.
State setter for column visibility.
Custom footer element.
Default sorting configuration.
Makes the table header sticky. Cannot be used with
stickyDialogHeader.Makes the table header sticky within a dialog. Cannot be used with
stickyHeader.Features
Column Resizing
Columns are resizable by default. Double-click the resize handle to reset a column to its default size.Sorting
ProvidesortFields to enable sorting. The component persists sort state in localStorage using the tableKey.
Pagination
The component supports cursor-based pagination. Pagination state is persisted in localStorage.Column Visibility
Control which columns are visible:Utility Functions
getInitialPagination
Retrieves initial pagination state from localStorage or returns a fallback.getInitialSortConditions
Retrieves initial sort conditions from localStorage with validation.Types
SortCondition
CustomColumnDef
Source
Location:/home/daytona/workspace/source/packages/ui/src/data-table/data-table.tsx