UI Library

DataTable

Default

ID Name Status
p1 Catalog Active
p2 Editor Active
p3 Viewer Draft
p4 Sync Active
p5 Archive Draft
p6 Portal Active
p7 Module 7 Active
p8 Module 8 Active
p9 Module 9 Draft
p10 Module 10 Active

Props

PropTypeDefaultNotes
rowsT[]Rows on the current page; the caller filters, sorts, and slices.
rowId(row: T) => stringStable key per row.
columnsDataTableColumn<T>[]Column defs with optional cell renderers.
loadingbooleanfalseShows the spinner when there are no rows yet.
emptyMessagestring'No rows'Shown when rows is empty.
searchValuestring''Bindable search text; filtering stays with the caller.
searchAriaLabelstring'Search'Accessible name for the search field.
searchPlaceholderstring'Search'Search placeholder.
showSearchbooleantrueRenders the search field.
chooserColumnsChooserColumn[]Column selector entries; the chooser is omitted when undefined.
chooserLabelstring'Choose columns'Accessible name for the column selector.
chooserResetLabelstring'Reset columns'Accessible name for the reset button.
onToggleColumn(key, checked) => voidColumn visibility handler.
onResetColumns() => voidReset handler; the caller also bumps resetWidthsSignal to drop resized widths.
paginationTrailingSnippetArbitrary content for the pagination row’s right edge.
selectablebooleanfalseRenders the checkbox column.
selectedIdsSet<string>Selected row ids; managed by the caller.
onToggleSelection(id, checked) => voidRow checkbox handler.
onToggleAll() => voidHeader checkbox handler.
totalnumberTotal rows across all pages.
pageSizenumberRows per page.
currentPagenumberOne-based current page.
onPageChange(page: number) => voidPage navigation handler.
onPageSizeChange(size: number) => voidPage-size handler.
tableClassstring'min-w-0'Extra classes for the table element; raise the minimum width when columns need a horizontal scroll floor.
fillHeightbooleanfalseFills the parent; table body scrolls.
bodyScrollbooleanfalseFixed header band with a body-only scrollport (needs fillHeight).
showPaginationbooleantrueRenders the pagination footer.
densebooleanfalseCompact padding for panel tables.
sortKeystring | nullnullBindable active sort column.
sortDirection'asc' | 'desc''asc'Bindable sort direction.
onSort(key, direction) => voidSort handler; or bind sortKey/sortDirection.
resizablebooleanfalseDraggable column resize handles.
storageKeystringPersists resized widths under this key.