You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 2479fb6
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: content/docs/references/ui/component.mdx
+72-3Lines changed: 72 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: Component schema — UI Protocol reference
3
3
navTitle: Component
4
-
description: "Component schemas of the ObjectStack UI Protocol: AIChatWindowProps and 43 more — each property with its type, default and a TypeScript example."
4
+
description: "Component schemas of the ObjectStack UI Protocol: AIChatWindowProps and 44 more — each property with its type, default and a TypeScript example."
5
5
---
6
6
7
7
{/* ⚠️ AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs live in the module folders under content/docs/. */}
@@ -13,8 +13,8 @@ description: "Component schemas of the ObjectStack UI Protocol: AIChatWindowProp
|**unknownUserText**|`string`| optional | Copy substituted when an entry has no resolvable actor. Literal string, every locale (renderer default: "Unknown user"). |
1510
1510
1511
1511
1512
+
---
1513
+
1514
+
## RecordLineItemsProps
1515
+
1516
+
### Properties
1517
+
1518
+
| Property | Type | Required | Description |
1519
+
| :--- | :--- | :--- | :--- |
1520
+
|**childObject**|`string`| optional | Child object whose records this grid lists, edits and saves. Optional because the component-level `dataSource` binding can supply the object instead; with neither, the panel shows a configuration hint and fetches nothing |
1521
+
|**relationshipField**|`string`| ✅ | FK on the child object pointing back to the parent record — the rows are queried as `{ [relationshipField]: parentId }`. Required: this panel does not auto-detect it |
1522
+
|**columns**|`{ name: string; label?: string; type?: Enum<'text' \| 'number' \| 'currency' \| 'date' \| 'datetime' \| 'time' \| 'select' \| 'lookup' \| 'file'>; width?: number; … }[]`| ✅ | Editable grid columns, drawn exactly as declared. Each entry is the strict, name-keyed inline grid column a relationship field's `inlineColumns` takes (`{ name, label?, type?, options?, … }` — objectui GridColumn); unknown keys and the retired `field` spelling are refused. Unlike the master-detail carriers, this block does NOT hydrate a column from the child object's field: declare `label`, `type` and `options` yourself — an identity-only `{ name }` column is a text cell headed by its name. Required, with at least one column: nothing derives them, and an empty list draws a grid with no cells |
1523
+
|**parentObject**|`string`| optional | Parent object the `totalField` rollup is written to (default: the object of the record on the page) |
1524
+
|**parentId**|`string`| optional | Parent record id the rows belong to (default: the record on the page). Wins over `recordId`|
1525
+
|**recordId**|`string`| optional | Alternate spelling of `parentId` the renderer also reads; `parentId` wins when both are set |
1526
+
|**amountField**|`string`| optional | Numeric child column summed for the running total and for the `totalField` rollup (default `amount` when only `totalField` is set) |
1527
+
|**totalField**|`string`| optional | Parent field to receive the rolled-up sum on save |
1528
+
|**title**|`string`| optional | Panel title. A literal string rendered as-is in every locale (no inline locale map — the panel renders it as a React child); renderer default: the localized "Line Items" |
1529
+
|**readonly**|`boolean`| optional | Render the grid read-only: cells locked, no Save button, and no adding or removing lines (renderer default: editable) |
1530
+
|**minRows**|`number`| optional | Minimum number of rows |
1531
+
|**maxRows**|`number`| optional | Maximum number of rows |
1532
+
|**filter**|`{ field: string; operator: Enum<'equals' \| 'not_equals' \| 'contains' \| 'not_contains' \| 'icontains' \| …>; value?: string \| number \| boolean \| null \| (string \| number)[] }[]`| optional | Additional criteria for the child rows — the ViewFilterRule array form `[{ field, operator, value }, ...]`, AND-combined with the parent relationship condition, never substituted for it: it can only narrow this record's lines |
1533
+
|**sort**|`{ field: string; order: Enum<'asc' \| 'desc'> }[]`| optional | Load order for the child rows — the SortItem array form `[{ field, order }, ...]` (renderer default: storage order) |
1534
+
|**limit**|`integer`| optional | Row cap for the child fetch (renderer default: 500). The grid has no pagination, so this is the window of rows that are editable and saved together |
|**name**|`string`| ✅ | Child field this column shows — the key the grid reads and writes on each row object (objectui GridColumn.name). The retired `field` spelling is refused. |
1541
+
|**label**|`string`| optional | Column header; defaults to the child field's label via hydration. |
1542
+
|**type**|`Enum<'text' \| 'number' \| 'currency' \| 'date' \| 'datetime' \| 'time' \| 'select' \| 'lookup' \| 'file'>`| optional | Cell control, derived from the child field's type when omitted. Declaring it opts the column out of schema hydration — supply the extras (options / reference / …) yourself. |
1543
+
|**width**|`number`| optional | Fixed column width in px; omitted columns use type-based role sizing (text flexes, numeric/date/select stay fixed). |
1544
+
|**required**|`boolean`| optional | Cell is flagged inline-invalid while empty. Computed columns are never required. |
1545
+
|**options**|`{ label: string; value: string }[]`| optional | Select-cell options for `type: 'select'`; derived from the child field's options when the column declares no `type`. |
1546
+
|**prefix**|`string`| optional | Symbol shown in a `currency` cell in place of the resolved currency's own symbol. No default: when omitted, the cell shows the symbol of the currency it resolves. It replaces the symbol only — the amount's decimal places stay the currency's. |
1547
+
|**step**|`number`| optional | Input step for numeric cells. |
1548
+
|**reference**|`string`| optional | Referenced object for `type: 'lookup'` cells; derived from the child lookup field when the column declares no `type`. |
1549
+
|**displayField**|`string`| optional | Label field shown for a picked lookup record. |
1550
+
|**idField**|`string`| optional | Id field stored for a picked lookup record. |
|**accept**|`string[]`| optional | Accepted MIME types / extensions for a `file` cell's picker (e.g. ['image/*', '.pdf']); omit to accept anything. |
1553
+
|**defaultHidden**|`boolean`| optional | Collapsed into the grid's column chooser by default (not dropped); required columns are never default-hidden. |
1554
+
|**computed**|`boolean`| optional | Read-only computed column, recomputed live from sibling cells via `expr` and written back into the row. |
1555
+
|**expr**|`string`| optional | Arithmetic expression for a computed column — a BARE string over `+ - * / %`, parentheses, numeric literals and field refs (`record.qty` or `qty`), evaluated by the grid's own safe evaluator. Deliberately NOT a CEL Expression envelope; `{ dialect, source }` is refused here. |
1556
+
|**scale**|`integer`| optional | Decimal places to round a computed numeric result to (integer 0-100). REFUSED on a column declaring `type: 'currency'` — delete it there: the currency's ISO 4217 minor unit decides. The upper bound is the renderer's: the grid rounds with `toFixed`, which throws a RangeError above 100. |
1557
+
|**autofill**|`boolean`| optional | For `lookup` columns: picking a record copies its same-named fields into sibling columns (a product's unit_price/description). On by default; set false to disable. |
1558
+
|**readonlyWhen**|`string \| { dialect: Enum<'cel' \| 'cron' \| 'template'>; source: string; ast?: any; meta?: object }`| optional | Predicate (CEL) — the cell is read-only when TRUE, evaluated per row against the row as `record` plus the header as `parent` (e.g. P`parent.status == 'paid'`). |
1559
+
|**requiredWhen**|`string \| { dialect: Enum<'cel' \| 'cron' \| 'template'>; source: string; ast?: any; meta?: object }`| optional | Predicate (CEL) — the cell is required when TRUE. Same `record` + `parent` scope as `readonlyWhen`. PRESENTATION ONLY: this flags the cell inline-invalid in the grid; nothing on the write path reads it. The server-enforced contract is the child FIELD's own `requiredWhen` — a transition gate, see `Field.requiredWhen` — which hydration copies onto an identity-only column, so declaring the requirement here alone enforces nothing. |
|**value**|`string \| number \| boolean \| null \| (string \| number)[]`| optional | Filter value. The accepted SHAPE depends on the operator: `in` / `not_in` take an array (any length, including []), `between` takes exactly [min, max], every other operator takes a scalar. The unary operators (is_empty / is_not_empty / is_null / is_not_null) take their direction from the operator name and ignore this key. One operator bounds the VALUE as well as the shape: `icontains` takes a NON-EMPTY STRING, the comparand the Filter Protocol conformance table declares for it — an empty comparand constrains nothing and a non-string one would answer a query nobody wrote, and both are refused at the query path too. |
0 commit comments