DataTable

View Source

Organize any type of data into rows and columns.

Collapsible subrows

HEADER
SIDEBAR
First Name
Last Name
Age
Address
Email
Other
Tiara
Bartell
14139
Stokes Causeway Arturo Estates, Milliemouth 74155
Rhiannon0@yahoo.com
Altenwerth - McDermott (Intuitive didactic budgetary management)
Chester
Daugherty
93749
Parker Manors Jenkins Tunnel, East Rolandoburgh 68931-7353
Schuyler32@yahoo.com
Schowalter - Tromp (Intuitive web-enabled open architecture)
Chelsey
Mraz
15625
Stokes Inlet O'Keefe Vista, Rogahnport 46383-8464
Gordon34@hotmail.com
Bins - Vandervort (Enterprise-wide asymmetric neural-net)
Samara
Watsica
69638
Thea Village Fadel Shoal, Romagueraside 13593
Zena.Mann@hotmail.com
Leffler and Sons (Seamless disintermediate capacity)
Wilfrid
Russel
16035
Halvorson Inlet Feeney Port, East Kristyside 48091-4915
Irwin.Windler52@hotmail.com
Bernier - Hauck (Cross-platform discrete knowledge user)
Maurice
Littel
34046
Elmer Pines Bernie Motorway, West Ramiro 07458-9417
Colten81@hotmail.com
Dicki LLC (Secured cohesive capability)
Leila
Johns
33988
Larkin Mews Herman Viaduct, Port Kevenmouth 63877-4706
Rachel11@yahoo.com
Gislason, Considine and Schowalter (Programmable user-facing core)
Della
Lowe
16465
Stehr Knoll Cathryn Vista, Schmittfort 82718
Tressie.Mayer@gmail.com
Larson and Sons (Quality-focused hybrid support)
Ara
Kuphal
44906
Gregoria Circles Sheldon Fields, Hermanberg 04200-9465
Joana89@hotmail.com
Trantow and Sons (Exclusive static customer loyalty)
Domenica
Ullrich
41299
Hintz Meadow Mante Shores, Port Vladimir 87901
Breana_Rippin@gmail.com
Parisian - Johnson (Reverse-engineered responsive help-desk)

Sortable rows

10 Results

Full Name
First Name
Last Name
Company

Oleta Murazik

Oleta
Murazik

Kiehn, Klein and Hamill

83505

Marcellus Goyette

Marcellus
Goyette

Friesen, Powlowski and Veum

47864

Aliza Marvin

Aliza
Marvin

Bernhard - Kuphal

88468

Nedra Ruecker

Nedra
Ruecker

Bartell LLC

56529

Ian Vandervort

Ian
Vandervort

Satterfield, Treutel and Schneider

13964

Kaylin Cruickshank

Kaylin
Cruickshank

Schneider Group

76591

Davion Kris

Davion
Kris

Herman, Hickle and Padberg

98909

Drake Connelly

Drake
Connelly

Steuber - Hane

33705

Evans Hammes

Evans
Hammes

Boyle - Gorczany

93362

Gaston McDermott

Gaston
McDermott

Williamson Inc

29113

Multiple drag and drop tables

Name
Age
Johann Daugherty
9369
Rolando Rath
38552
Adalberto Schowalter
10979
Name
Age
Carolyn DuBuque
67611
Hettie Deckow
849
Marcelo Dickens
61948
Brittany Hyatt
93186
Alexandrea McLaughlin
25092

Grouped data

Name
Position
Start Date

Lehner, Reilly and Lind

Palma Leuschke
Legacy Intranet Liaison
06/08/2026

Langworth Inc

Keshaun Hickle
Corporate Communications Director
07/26/2026
Madelyn Nolan
Lead Quality Director
12/20/2025

Schmeler LLC

Stacy Muller
Future Web Supervisor
04/28/2026
Taylor McDermott
Lead Operations Consultant
08/07/2026

Props

accessibilitysignature
toggleAllSubRowsTooltipTitle:Function

Provides the ability to change accessible labels used throughout the DataTable component.

Controls whether or not sub-rows can be collapsed.

columnsArray
alwaysVisible:boolean

Forces the column to always be visible regardless of hiddenColumnIds. This is also used to build a list of eligible columns for the ColumnPicker component.

cell:string | unknown

Controls how the incoming row data is rendered in a cell. Accepts a string that will be used as an accessor of the row data or a function that returns the row data as well as extra information about the row and column.

css:any
defaultSortDirection:'ASC' | 'DESC'

Overrides defaultSort.direction for this specific column. Defaults to ASC if neither values are provided.

footer:any

Similar to column.header. Controls the column footer rendering.

header:any

Controls the column header rendering. Accepts a string, element, component or function.

id:string | number

Used to identify a column. Required when using onRowSort or hiddenColumnIds.

includeSubCellWidth:boolean

Includes sub cells when calculating auto column widths.

label:string

Used to describe a column in ColumnPicker when header doesn't display any text like checkbox or icon.

maxWidth:number

The maximum size a column can be.

minWidth:number

The minimum size a column must be.

sortable:boolean

Determines if a column can be sorted or not. Defaults to false. See onColumnSort below for details on controlling sorting.

subCell:string | Function

Determines how a sub row cell is rendered. Uses cell as the default accessor if nothing is provided.

width:number

Specifies how wide a column is. If omitted, cell will be measured and calculated based on the largest column's cell width.

Determines how the incoming data is rendered as columns. Please note for optimal performance identity should not change between every render and should be static or memoized.

Current visible page number for pagination

dataArray

Accepts an array of data to be rendered. Data cells are ordered by the columns array.

Ref that is passed to useImperativeHandle which in turn returns `useCollapsibleRows.

Controls whether or not sub-rows are open by default.

defaultSortsignature
columnId:string | number
direction:'ASC' | 'DESC'

Default sorting for columns. Please note this only affects controls and requires you to manage sorting the data yourself. See onColumnSort below for details on controlling sorting.

Droppable identifier used for internal DragDrop component.

Provide an empty state when the table has no data.

getRowId(rowData: Data, rowIndex: number) => number | string

(rowData: object, rowIndex: number) => number

Used to identify rows. Defaults to rowData.id if available, otherwise uses rowIndex.

getSubDataFunction

(rowData: object) => array<object>

Controls rendering of collapsible sub row content.

Hide specific columns by their id.

innerBodyRefFunction

(bodyRef: object) => void

Used to gain access to the internal bodyRef.

Accepts an object of keyboard shortcuts that can be performed when hovering a row. e.g. { 'a': ({ rowData }) => addUser(rowData.id) }. See the mousetrap library for valid key combinations.

loadingboolean

Puts the table in a loading state and shows a spinner in the middle of the table.

Provide an accompanying title to the spinner while loading data.

onColumnSortFunction

(sortedColumns: { columnId, direction }) => void

Callback when a column header has been pressed.

onDragEndFunction

onDragEnd: (event) => void

Called at the end of a child Draggable drag.

onDragStartFunction

onDragStart: (event) => void

Called at the start of a child Draggable drag.

onDropFunction

onDrop: (event) => void

This function will be called when a Draggable has been dropped. Returns the onDragEnd event with any Draggable data attached.

onPageChangeComponentProps['onPageChange']

(nextPage: number) => undefined

Callback when new page is requested for pagination.

onRowClickFunction

(rowData: any, rowIndex: number, event: React.SyntheticEvent) => void

Callback when a row has been clicked.

onRowSortFunction

(sortedData: array) => void

Callback when a row has been sorted.

sourceOnlyboolean

This prop controls whether or not the droppable can receive and reorder draggables. If true, draggables may move outside the droppable, but not added.

Total available pages for pagination.

variantsignature | Array
body:Object
bodyCell:Object | Function

({ firstRow, lastRow, firstCell, lastCell, rowData, rowIndex, columnIndex }) => object

bodyRow:Object | Function

({ isLink, firstRow, lastRow, evenRow, oddRow, rowData, rowIndex }) => object

bodySubCell:Object | Function

({ firstRow, lastRow, firstCell, lastCell, rowData, rowIndex, columnIndex, columnWidth }) => object

bodySubRow:Object | Function

({ isLink, firstRow, lastRow, evenRow, oddRow, rowData, rowIndex, parentRowIndex }) => object

header:Object
headerCell:Object | Function

({ columnIndex, isSortable }) => object

headerRow:Object

Provides the ability to change styles used throughout the DataTable component.