ui/read
ui/read
此内容目前仅提供英文版。
导入自 @norbital-ai/ui/read
@norbital-ai/ui/read: the read helpers a host or page shares with ui's views. label_read reads a record label's own-field dependencies; unref turns read rows back into foreign-key ids with each target's label in $refs.
select
label_read function
function label_read(cat: Catalog, of: string, options?: Layer & { output?: string; }): { readonly [root: string]: { readonly [key: string]: import("@norbital-ai/store").Json; }; } Read only the optional record label's own-field dependencies; missing labels read no extra fields.
参数
| 名称 | 类型 | 说明 |
|---|---|---|
cat | Catalog | |
of | string | |
options? | Layer & { output?: string; } |
源码: packages/ui/src/relations/select.ts:103
unref function
function unref(cat: Catalog, of: string, refs: readonly string[], rows: readonly Row[], all?: boolean): readonly Row[]
function unref(cat: Catalog, of: string, refs: readonly string[], rows: readonly Values[], all?: boolean): readonly Values[] Rows read by listSelect back to their FK ids (a many-relation to its ids, its first MANY_SHOWN unless all), each target's label beside them in $refs (the default cell's link).
参数
| 名称 | 类型 | 说明 |
|---|---|---|
cat | Catalog | |
of | string | |
refs | readonly string[] | |
rows | readonly Row[] | |
all? | boolean |