DataTableProps
Defined in: packages/react/src/components/ui/data-table/DataTable.tsx:25
Props for DataTable component.
Type Parameters
Section titled “Type Parameters”TData extends object
Row data type (must have _id field for selection)
Defaults:
isDone: trueisLoadingMore: falseenableRowSelection: falseenableBulkActions: falseentityName: “items”isDeleting: falseisLoading: false
Properties
Section titled “Properties”columns
Section titled “columns”columns:
ColumnDef<TData>[]
Defined in: packages/react/src/components/ui/data-table/DataTable.tsx:30
TanStack Table column definitions.
data:
TData[]
Defined in: packages/react/src/components/ui/data-table/DataTable.tsx:27
Array of data to display in table rows.
enableBulkActions?
Section titled “enableBulkActions?”
optionalenableBulkActions?:boolean
Defined in: packages/react/src/components/ui/data-table/DataTable.tsx:72
Enable bulk action bar when rows are selected.
Requires enableRowSelection=true to work.
enableRowSelection?
Section titled “enableRowSelection?”
optionalenableRowSelection?:boolean
Defined in: packages/react/src/components/ui/data-table/DataTable.tsx:66
Enable checkbox column for row selection.
entityName?
Section titled “entityName?”
optionalentityName?:string
Defined in: packages/react/src/components/ui/data-table/DataTable.tsx:80
Entity name for UI labels (e.g., “posts”, “files”). Used in bulk delete modal: “Delete 5 posts?“
isDeleting?
Section titled “isDeleting?”
optionalisDeleting?:boolean
Defined in: packages/react/src/components/ui/data-table/DataTable.tsx:92
Whether bulk delete mutation is in flight. Disables bulk action buttons during deletion.
isDone?
Section titled “isDone?”
optionalisDone?:boolean
Defined in: packages/react/src/components/ui/data-table/DataTable.tsx:38
Whether all results have been loaded.
When true, Load More button is hidden.
isLoadingMore?
Section titled “isLoadingMore?”
optionalisLoadingMore?:boolean
Defined in: packages/react/src/components/ui/data-table/DataTable.tsx:50
Whether Load More query is in flight. Shows loading state on button.
isPending?
Section titled “isPending?”
optionalisPending?:boolean
Defined in: packages/react/src/components/ui/data-table/DataTable.tsx:100
Whether initial data is loading. Shows loading skeleton in table body.
onBulkDelete?
Section titled “onBulkDelete?”
optionalonBulkDelete?: (selectedIds) =>Promise<void>
Defined in: packages/react/src/components/ui/data-table/DataTable.tsx:86
Callback when bulk delete is confirmed. Receives array of selected document IDs.
Parameters
Section titled “Parameters”selectedIds
Section titled “selectedIds”string[]
Returns
Section titled “Returns”Promise<void>
onLoadMore?
Section titled “onLoadMore?”
optionalonLoadMore?: () =>void
Defined in: packages/react/src/components/ui/data-table/DataTable.tsx:44
Callback when Load More button is clicked. Parent should fetch next page and append to data.
Returns
Section titled “Returns”void
totalCount?
Section titled “totalCount?”
optionaltotalCount?:number|null
Defined in: packages/react/src/components/ui/data-table/DataTable.tsx:61
Total count of documents across all pages.
numberwhen count succeedednullwhen collection has >32k documentsundefinedwhen count not requested
Used to show “All X items loaded” message.