OperationCatalog
API reference and demos for OperationCatalog.
Import
Section titled “Import”import { OperationCatalog } from "@flanksource/clicky-ui/rpc";The props table documents the component-specific surface. Standard DOM attributes inherited from React, such as className, event handlers, and accessibility attributes, may also be accepted when the component’s prop type extends a native element.
| Prop | Type | Default | Description |
|---|---|---|---|
actionInitialValues |
Record<string, Record<string, string>> |
— | — |
actionLabels |
Record<string, string> |
— | — |
actionsContainer |
Element | null |
— | Portal target for the collection action bar (Create, bulk actions). When set, the bar renders into this element — typically an app shell's `bodyActions` slot — instead of inline under the catalog header. A portal rather than a render-prop because the bar owns its own dialog state and closes over the catalog's live filters and list query; moving the element would sever both. Falls back to inline rendering when null, so existing consumers are unaffected. |
allOperations |
boolean |
false |
— |
cellRenderers |
ClickyCellRenderers |
— | Override selected result table cells using raw server values. |
client* |
OperationsApiClient |
— | — |
commandRuntime |
ClickyCommandRuntime |
— | — |
definition* |
DomainDefinition |
— | — |
entities* |
string[] |
— | — |
filterPre |
FilterExtension[] |
— | — |
follow |
OperationCatalogFollowOption |
— | Follows the surface's list results live over the commons-db sessions SSE API instead of polling: rows the server has appended since the last fetch appear in the table without a refetch. Requires the list operation to advertise a session-start operation (`POST <listPath>/sessions`) in the loaded OpenAPI document — when it does not, the catalog fails loudly with an explicit error naming the surface rather than silently rendering as if `follow` had never been set. The session opens with the same locked values and active filters the list request itself sends, and restarts whenever either changes. Pass `{ maxRows }` to size the in-memory live buffer (default 5,000 — see `useLogTail`); older rows are evicted and counted as `dropped`. |
formActions |
FormActionsRenderer |
— | — |
formPost |
PostExtension[] |
— | — |
formPre |
PreExtension[] |
— | — |
getCommandHref |
(…) => string |
(operationId: string) => `/commands/${operationId}` |
— |
getRowDetailHref |
(…) => string |
— | — |
hiddenColumns |
string[] |
— | Column names retained in raw rows for detail rendering but omitted from the table. |
initialValues |
Record<string, string> |
{} |
Editable seed values for filters the URL has no value for yet — e.g. a database filter that should start at the host's current environment but stay changeable. Applied per-key only when the URL is silent on that key (a URL value always wins), still rendered as an ordinary editable filter field, and never sent as a locked value or written back to the URL as anything other than the resulting filter edit. Unlike `lockedValues`, these seed the FilterBar's own state, not an overlay on top of it. |
lockedValues |
Record<string, string> |
{} |
Parameter values pinned by the host — sent on every list request, every filter lookup (both `client.lookupFilters` and per-filter type-ahead), and every export/download URL. Never rendered as an editable filter chip or form field, and never round-tripped through the URL: the host, not the reader, owns them (e.g. the `stream` a trace-results panel is scoped to). |
paginationMode |
enum |
— | Omit to infer cursor walking automatically; set when a host requires a specific paging presentation. |
refreshIntervalMs |
number |
— | Poll the current server page while it can change, in milliseconds. |
renderError |
(…) => ReactNode |
— | — |
renderLink* |
RenderLink |
— | — |
resultRenderer |
ResultRenderer |
— | — |
rowCard |
ClickyRowCardRenderer |
— | Render each list result as a card from its raw row values. |
rowDetail |
{ render: ClickyRowDetailRenderer; style?: "dialog" | "row"; dialogSize?: ModalSize; title?: ClickyRowDetailTitle; } |
— | Host row-detail configuration for the result table. `render` receives raw row values keyed by column name, including columns hidden from `columns` — see `ClickyRowDetailRenderer`. Never disturbs server paging, filters, sort or export. |
rowSelection |
OperationCatalogRowSelection |
— | Turns the catalog into a picker: every row gets a checkbox, a row click toggles it instead of opening the detail page, and the surface's action bar (create and bulk actions) is not rendered — the host owns the selection and what happens to it. Requires a list operation. |
selectionNoun |
string |
— | Plural noun used by the cross-page selection notice. |
surfaceKey |
string |
— | — |
urlState |
false | { prefix: string; } |
— | Controls whether list filters/pagination/sort read and write the URL. Omit for today's behaviour: unprefixed query params. `false` neither reads nor writes the URL — for a catalog embedded where the host owns the whole URL. `{ prefix }` reads and writes only `<prefix>.<name>` keys, so the catalog can live inside a host route with its own `?step=`/`?tab=` params without colliding. |