Skip to main content

Type Alias: OpenApiTableProps

OpenApiTableProps = object

Defined in: table/OpenApiTable.tsx:29

Properties​

actions?​

optional actions?: React.ReactNode

Defined in: table/OpenApiTable.tsx:70

Extra content on the right of the toolbar, e.g. a "New" button.


columns?​

optional columns?: (string | OpenApiTableColumn)[]

Defined in: table/OpenApiTable.tsx:42

Columns to show, in order. A string keeps the default header and formatting. Omit to derive the columns from the response schema.


emptyState?​

optional emptyState?: React.ReactNode

Defined in: table/OpenApiTable.tsx:72

Replaces the default empty state when the API returns no records.


filterable?​

optional filterable?: boolean

Defined in: table/OpenApiTable.tsx:64

Shows filter chips for a status/state field declared as an enum. The filter is sent to the server when the operation accepts that query param. Defaults to true.


getRowId?​

optional getRowId?: (item, index) => string

Defined in: table/OpenApiTable.tsx:68

Stable key per record. Defaults to its id, else the row index.

Parameters​

ParameterType
itemJsonObject
indexnumber

Returns​

string


maxColumns?​

optional maxColumns?: number

Defined in: table/OpenApiTable.tsx:44

Cap on derived columns when columns is omitted. Defaults to 6.


onRowClick?​

optional onRowClick?: (item) => void

Defined in: table/OpenApiTable.tsx:66

Called with the record when a row is clicked; rows become interactive.

Parameters​

ParameterType
itemJsonObject

Returns​

void


operationId​

operationId: string

Defined in: table/OpenApiTable.tsx:31

operationId of the list operation (a GET returning an array or a paginated wrapper).


pageSize?​

optional pageSize?: number

Defined in: table/OpenApiTable.tsx:46

Rows per page. Defaults to 10.


pagination?​

optional pagination?: TablePaginationMode

Defined in: table/OpenApiTable.tsx:52

auto (default) paginates on the server when the operation declares limit/offset or page/size query params, and in the browser otherwise. client always pages in the browser; none shows every row.


params?​

optional params?: OperationParams

Defined in: table/OpenApiTable.tsx:37

Path and query params for the request, as one flat object. Each lands where the spec declares it; params the operation does not declare are ignored.


searchable?​

optional searchable?: boolean

Defined in: table/OpenApiTable.tsx:58

Shows a search input. It sends a q/search/query param when the operation declares one, and filters the loaded rows otherwise. Defaults to true.