fix: default DataTable status to success so rows render

status was required with no default; omitting it left the body blank
while the footer (which renders regardless of status) still showed
"Showing 1-N of N". Rows to draw is the common case, so default to
success instead of requiring every caller to pass it explicitly.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Hagernesh
2026-08-10 12:02:19 +00:00
parent bf8eadbc85
commit 45715d6838

View File

@@ -13,7 +13,10 @@ import { DataTableFooter } from "./footer";
export function DataTable<TData, TValue>({
columns,
data,
status,
// The body only renders under "success", but the footer renders regardless —
// omitting status gave a blank table under a populated "Showing 1N of N"
// footer. Having rows to draw is the default case, so default to success.
status = "success",
onRowClick,
rowStyle,
rowClassName,