DataTableProps
DataTableProps<
T> =object
Defined in: packages/ui/src/types.ts:506
Props for the DataTable component.
Renders a sortable, selectable data table with permission-aware row actions.
Integrates with @cfast/pagination for data, @cfast/db for column inference,
@cfast/permissions for action visibility, and @cfast/actions for row-level
operations.
- ColumnShorthand for column configuration options.
- ListViewProps which composes DataTable with filters and pagination.
Type Parameters
Section titled “Type Parameters”T = unknown
The row object type for type-safe column rendering and selection callbacks.
Properties
Section titled “Properties”actions?
Section titled “actions?”
optionalactions:ClientDescriptor
Defined in: packages/ui/src/types.ts:519
Action descriptor for row-level actions.
columns?
Section titled “columns?”
optionalcolumns:ColumnShorthand<T>[]
Defined in: packages/ui/src/types.ts:517
Column definitions or key strings.
data:
object
Defined in: packages/ui/src/types.ts:508
Paginated data including items and loading state.
isLoading?
Section titled “isLoading?”
optionalisLoading:boolean
Whether data is currently being fetched.
items:
T[]
Array of row objects to display.
emptyMessage?
Section titled “emptyMessage?”
optionalemptyMessage:string
Defined in: packages/ui/src/types.ts:531
Message shown when there are no items.
getRowId()?
Section titled “getRowId()?”
optionalgetRowId: (row) =>string|number
Defined in: packages/ui/src/types.ts:529
Function to extract a unique ID from a row. Defaults to row.id.
Parameters
Section titled “Parameters”T
Returns
Section titled “Returns”string | number
onRowClick()?
Section titled “onRowClick()?”
optionalonRowClick: (row) =>void
Defined in: packages/ui/src/types.ts:527
Callback when a row is clicked.
Parameters
Section titled “Parameters”T
Returns
Section titled “Returns”void
onSelectionChange()?
Section titled “onSelectionChange()?”
optionalonSelectionChange: (rows) =>void
Defined in: packages/ui/src/types.ts:525
Callback when row selection changes.
Parameters
Section titled “Parameters”T[]
Returns
Section titled “Returns”void
selectable?
Section titled “selectable?”
optionalselectable:boolean
Defined in: packages/ui/src/types.ts:521
Whether to show row selection checkboxes.
selectedRows?
Section titled “selectedRows?”
optionalselectedRows:T[]
Defined in: packages/ui/src/types.ts:523
Externally controlled selected rows.
table?
Section titled “table?”
optionaltable:unknown
Defined in: packages/ui/src/types.ts:515
Drizzle table for column type inference.