Table structure (frontend contract)

Shape of the structure object from the control-table API and how the UI consumes it

The frontend never hard-codes columns or actions. A feature page loads structure with useTableStructure, then passes the result to ReactApiTable as the table prop.

Backend owns the contract

Field names and allowed values are defined by the control-table backend. This page describes how bolesa-app-ui reads that JSON — validate against your API response when wiring a new table.

How structure is loaded

getTableStructure({ table: '/api-table/control-tables/load-table/my-feature' });
StepFileBehavior
GEThooks/useTableStructure.tsaxiosTable.get(table, { headers: { ln: locale } })
StateSame hooktableStructure = response.data (app-specific wrapper shape)
MountApiTablesControllerdispatch(_getTableComponents({ ...table, customElement? }))

The exact GET path is per feature (see Getting started examples).

Fields consumed by ApiTablesController

ApiTablesController spreads table into Redux via _getTableComponents and related actions:

FieldRedux / usageRequired
tableNametableCore.tableName — segment in query-table/{tableName}Yes
columnsstructureColumns → formatted for RDTYes
filtersstructureFilters — filter sheet; omit or [] to hide filtersNo
bulkActionsbulkActions sliceNo
rowActionsFlattened into structureRowActions; may include general_actionsNo

Optional prop customElement (not from API): see Custom elements.

Column object (columns[])

Used by formatTableColumns in ./ApiTables/table-utils/utils.tsx and cell renderers in ColumnCellTypes.tsx.

FieldPurpose
labelHeader text
data_srcRow field key
typeRenderer — see Column types
sortableServer sort when true
showableIf false, column is excluded from the table
values_formatingBadges / boolean labels (type-specific)
Link-onlylinkStyle, linkText, linkColor, showCopyBtn

Per-row row.actions (object keyed by action id) is required for type: "actions" columns.

Filter object (filters[])

FieldPurpose
filter_nameForm key and appliedFilters key
labelUI label
typetext, number, select, boolean, null, date, multi_select — see Filters
propsselect_options, operators, selectOptions, pair_with, etc.

Row actions (rowActions)

Two shapes:

  1. Flat map — action id → action definition (used directly).
  2. general_actions — nested map; controller flattens for structure and sets actionsInRegularCells so actions render inside regular columns instead of a dedicated actions column.

Each action typically includes action_type, method, action.api, button, need_confirmation, onSuccess, applicableAsBulkAction, action_key. See Row action types.

Bulk actions (bulkActions[])

List of bulk operations: action_key, method, action.api, need_confirmation, onSuccess, labels, etc. See Bulk actions.

Query-table response (data phase)

Not part of structure GET, but every developer needs it:

{
  "items": [],
  "pagination": {},
  "bindings": {}
}

itemstableData; paginationTablePagination; bindingstableBindings (optional server hints).

POST body from the client is documented in Architecture overview.

On this page