Docs
CodeRabbit
Cloudflare
Railway
Netlify
OpenRouter
Clerk
SerpAPI
WorkOS
AG Grid
Sentry
Prisma
Unkey
Electric
CodeRabbit
Cloudflare
Railway
Netlify
OpenRouter
Clerk
SerpAPI
WorkOS
AG Grid
Sentry
Prisma
Unkey
Electric
Table API Reference
Column API Reference
Row API Reference
Cell API Reference
Header API Reference
Features API Reference
Static Functions API Reference
Legacy API Reference
Static Functions API Reference

table_getLeafHeaders

Function: table_getLeafHeaders()

ts
function table_getLeafHeaders<TFeatures, TData>(table): Header<TFeatures, TData, unknown>[];
function table_getLeafHeaders<TFeatures, TData>(table): Header<TFeatures, TData, unknown>[];

Defined in: core/headers/coreHeadersFeature.utils.ts:187

Collects only the leaf headers from the current header tree.

Parent/group headers are skipped, making the result suitable for rendering one header per visible leaf column.

Type Parameters

TFeatures

TFeatures extends TableFeatures

TData

TData extends RowData

Parameters

table

Table_Internal<TFeatures, TData>

Returns

Header<TFeatures, TData, unknown>[]

Example

ts
const leafHeaders = table_getLeafHeaders(table)
const leafHeaders = table_getLeafHeaders(table)