DataTable
The DataTable component provides a feature-rich interface for displaying tabular data with sorting, pagination, row selection, and customizable columns.
Examples
(8)Properties
(97)Playground
Getting Started
Define columns, feed the dataset, and let
DataTable handle search, sorting, and pagination out of the box.Column Filters
Mark columns
filterable and set filterType to pick the control: an input for text/number/date, a dropdown for select/boolean (options auto-derived from the data when filterOptions is omitted). showColumnFilters renders those controls as a persistent row under the headers; omit it to keep them in each header's filter menu.Row Selection
Set
selectable and wire selectedRows / onSelectionChange to track checked rows. Give getRowId so selection survives sorting and paging.Rich Cells
Combine avatars, chips, and status cues inside custom
cell renderers to create a readable, on-brand table.Expandable Rows
Provide
expandedRows, update them via onExpandedRowsChange, and use expandableRowRender to reveal supporting context.Grouping & Totals
Set
groupBy to a column key to group rows under collapsible group-header rows. Add aggregate (sum, avg, min, max, count, or a function) to any column to show its per-group total in the group header, and set showFooterTotals for a grand-total footer row aligned to the same columns. Grouping spans all filtered rows, so client pagination is bypassed while it is active.Fixed height & sticky columns
Pass a fixed
height to cap the table's size — the header row stays pinned while the body scrolls, so a long list fits a constrained panel without paginating. Pin columns to the edges with sticky: 'left' or sticky: 'right' so they stay put while the rest scroll horizontally; give each pinned column an explicit numeric width so its frozen offset lines up. Sticky positioning is web-only (a no-op on native).Server-side pagination
Set
manualPagination when the data comes from a paginated API. The data prop is treated as the already-fetched current page — the table does no client-side slicing, filtering, or sorting — and pagination.total drives the page count and "X-Y of N" summary. The sort, filter, search, and page controls still fire their callbacks (onSortChange, onFilterChange, onSearchChange, onPaginationChange) so you can refetch. Pair it with loading to show the skeleton during each fetch.</>
react-ui-library
100+ accessible, themeable components that work seamlessly across iOS, Android, and Web.
A Platform Blocks product.
Quick Links
Resources