Home > @polyspec/crudui-validator > ItemsSource
ItemsSource interface
Dynamic option source (dependency isolation: dynamic items → items sub). Collects the source descriptor in one place.
STRUCTURE ONLY. This type fixes the declared shape of a dynamic source; it does NOT load options. The supported shape (type: search) is a model (a name string OR a nested { table, relations, keys } query) plus a sibling api_server (a runtime HTTP-endpoint function reference) plus a placeholder static items. None of model/api_server/items is resolved here — the runtime calls api_server, runs the model query, and replaces the placeholder. Runtime resolution is out of scope (SPEC §6 R1).
Signature:
export interface ItemsSource
Properties
|
Property |
Modifiers |
Type |
Description |
|---|---|---|---|
|
string |
(Optional) Runtime HTTP-endpoint function reference (an opaque source-callback string, e.g. | ||
|
StaticItem[] | ChoiceList | ItemLabelMap |
(Optional) Placeholder static | ||
|
string |
(Optional) Method on the model invoked to fetch option rows. | ||
|
string | ItemsModel |
(Optional) Data model the options are loaded from. Either a model-name string OR a nested | ||
|
unknown |
(Optional) Relation descriptors used when loading options. | ||
|
string |
(Optional) Table the options are loaded from (top-level shorthand of |