API and Development
DataTable from @prepared911/ui/data-table is the interactive table. Columns are DataTableColumn<T>[]. Each row needs a stable id.
| Prop | Meaning |
|---|---|
columns | accessorKey or accessorFn plus id. cell renders something other than text. |
data | The current rows. |
copy | emptyMessage and loadingLabel. Optional noResultsMessage and pagination words. |
aria-label or aria-labelledby | One is required. |
enableSorting on a column makes the header a button. manualSorting keeps the server's order.globalFilter narrows by column text. manualFiltering means the server already filtered.actionMenu ends every row with one "more" button. A row does not list actions inline.multiSelect and bulkActions show the selection toolbar.detail opens the record in a drawer. onRowClick and selectedRowId are for a drawer you render yourself, with horizontalScrollSpacing or scrollRoomElement.virtualizeRows windows a very long page. Most tables should page instead.copy.pagination shows the footer. manualPagination uses pages or rowCount.Filters from @prepared911/ui/blocks/filters. The table does not import it.