Skip to main content
zerotal

Documentation


Documentation / @zerotal/flow-ui / index / TableProps

Interface: TableProps<T>

Defined in: flow-ui/src/components/Table.tsx:36

Type Parameters

T

T = Record<string, unknown>

Indexable

[key: string]: unknown

Properties

columns

columns: TableColumn<T>[]

Defined in: flow-ui/src/components/Table.tsx:37


rows

rows: T[]

Defined in: flow-ui/src/components/Table.tsx:38


sortBy?

optional sortBy?: string

Defined in: flow-ui/src/components/Table.tsx:39


sortDir?

optional sortDir?: "asc" | "desc"

Defined in: flow-ui/src/components/Table.tsx:40


params?

optional params?: Record<string, string | number | null | undefined>

Defined in: flow-ui/src/components/Table.tsx:42

Extra query params to keep in sort links (e.g. a search term).


rowKey?

optional rowKey?: string

Defined in: flow-ui/src/components/Table.tsx:44

Field used as the row key (defaults to the first column's key).


hover?

optional hover?: boolean

Defined in: flow-ui/src/components/Table.tsx:45


groups?

optional groups?: TableGroup<T>[]

Defined in: flow-ui/src/components/Table.tsx:47

Render grouped row blocks (with header rows) instead of flat rows.


footerCells?

optional footerCells?: unknown[]

Defined in: flow-ui/src/components/Table.tsx:49

A table-level summary row (<tfoot>), cells aligned 1:1 with columns.


filterCells?

optional filterCells?: unknown[]

Defined in: flow-ui/src/components/Table.tsx:56

A second header row for per-column controls — filter boxes, say — with cells aligned 1:1 with columns. Inside <thead> so the controls stay put when the body scrolls, and so a screen reader reads them as belonging to their column rather than as a stray first row of data.


class?

optional class?: string

Defined in: flow-ui/src/components/Table.tsx:57


theadClass?

optional theadClass?: string

Defined in: flow-ui/src/components/Table.tsx:58