DataTable
DataTable takes arrays of arrays of data and handles them correctly to build a table. It supports pinnable columns unlike Table, but is less flexible.
Package: @terreno/ui
Categories: Pattern
Props interface: DataTableProps
Story source: demo/stories/DataTable.stories.tsx
Live demo
Props
| Prop | Type | Required | Description |
|---|---|---|---|
columns | array | Yes | |
data | array | Yes | |
alternateRowBackground | boolean | ||
customColumnComponentMap | DataTableCustomComponentMap | ||
defaultTextSize | union | ||
getRowTestID | reflection | Returns a stable key for row test ids. Defaults to row index when omitted. | |
headerHeight | number | ||
moreContentComponent | ComponentType | When tapping the eye icon, a modal is shown with more info about the row. | |
moreContentExtraData | array | ||
page | number | ||
pinnedColumns | number | ||
rowHeight | number | ||
setPage | reflection | ||
setSortColumn | reflection | ||
sortColumn | ColumnSortInterface | ||
testID | string | Root test id for the primary interactive element or container. | |
testIDs | DataTableTestIDs | ||
totalPages | number |