DataTable

View Source

Organize any type of data into rows and columns.

Collapsible subrows

HEADER
SIDEBAR
First Name
Last Name
Age
Address
Email
Other
Mozelle
Welch
18835
Upton Bypass Kyra Tunnel, Bayerport 03578-3206
Baby.Erdman@gmail.com
Terry LLC (Cloned local knowledge base)
Talon
Nitzsche
58114
Earnest Forge Emilie Well, Jennieview 57569-6870
Juvenal25@yahoo.com
Stroman - Altenwerth (Adaptive bifurcated approach)
Dennis
Kemmer
60
Lind Wells Josefa Lake, Elvamouth 04648
Floyd_Robel@hotmail.com
Cole Inc (Reactive fresh-thinking service-desk)
Reese
Johnston
61708
Casper Mount Purdy Drive, South Damonmouth 87501
Jeanie72@hotmail.com
Reinger - Lueilwitz (Configurable static knowledge base)
Bernie
Renner
41942
Yost Ford Hobart Point, Reillyshire 05433
Torrance_Keebler89@hotmail.com
Leffler - Labadie (Sharable upward-trending synergy)
Mallie
West
98703
Sipes Motorway Trevion Points, Christiansenfort 85839
Graciela.Ebert@yahoo.com
Wiza - Williamson (Re-contextualized hybrid model)
Caleigh
Cruickshank
41096
Sandrine Orchard Ora Harbor, Eltamouth 74806
Johann_Heaney@yahoo.com
Osinski - Kilback (Fundamental zero defect algorithm)
Candido
Johns
23623
Dovie Skyway Dedrick Pine, East Gerardshire 13088-4001
Germaine61@hotmail.com
Bosco, Schuppe and Ward (Configurable didactic instruction set)
Margot
Stroman
2897
Jaqueline Village Newell Loaf, East Joanymouth 05383
Gerry83@yahoo.com
Nikolaus, Metz and Hermiston (Ergonomic discrete secured line)
Ezra
Metz
50177
Darrell Bridge Haven Course, Veumfort 89901
Chaim_Tillman@gmail.com
Boyle - Stiedemann (Upgradable client-driven success)

Sortable rows

10 Results

Full Name
First Name
Last Name
Company

Evalyn Koepp

Evalyn
Koepp

Spencer - Herman

74971

Arnaldo Hudson

Arnaldo
Hudson

Macejkovic - Greenholt

67755

Wilburn Graham

Wilburn
Graham

Kutch Group

15289

Michele Windler

Michele
Windler

Kessler - Abshire

59925

Josie Padberg

Josie
Padberg

Bashirian and Sons

90771

Courtney Rohan

Courtney
Rohan

Connelly Inc

33897

Chad Wintheiser

Chad
Wintheiser

Koelpin LLC

9070

Katlyn Murphy

Katlyn
Murphy

Padberg LLC

35721

Lydia Koss

Lydia
Koss

Dibbert, Schuppe and Daniel

47838

Boyd Wolff

Boyd
Wolff

Krajcik, Hills and Moen

48527

Multiple drag and drop tables

Name
Age
Bethany Bartell
64339
Gina Pollich
58396
Arjun Wiegand
76216
Name
Age
Bruce Will
63809
Alexzander Jast
89344
Remington Gaylord
81008
Jocelyn Rolfson
41311
Sadie Hauck
95741

Grouped data

Name
Position
Start Date

Kautzer Inc

Skylar Mante
Human Factors Assistant
06/26/2025
Pat Russel
Central Creative Architect
07/23/2025
Frederic Bernier
International Response Designer
03/27/2025

Ankunding and Sons

Deshawn Mitchell
Dynamic Interactions Administrator
09/07/2025
Justyn Weber
Senior Usability Producer
10/04/2025
Bonita Purdy
Future Quality Officer
12/22/2024

Jacobs - Senger

Humberto DuBuque
Forward Tactics Analyst
01/20/2025
Tyrel Schmeler
Forward Infrastructure Architect
04/20/2025
Coty Schumm
Customer Group Administrator
04/03/2025
Stacey Tremblay
Internal Accountability Administrator
07/31/2025
Tierra Steuber
Internal Paradigm Orchestrator
08/21/2025
Bianka Bogisich
Forward Mobility Officer
02/22/2025

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.