Skip to content

FieldComponentMap

FieldComponentMap<F, TFieldMeta> = { [K in AdminField["type"]]: { cell: ApplyComponent<F, CellComponentProps<Extract<AdminField<TFieldMeta>, { type: K }>>>; input: ApplyComponent<F, InputComponentProps<TFieldMeta, Extract<AdminField<TFieldMeta>, { type: K }>>> } }

Defined in: packages/core/src/framework.ts:32

Maps every field type in the AdminField union to the framework’s input component type for that field.

Keyed by AdminField['type'] — as new field types are added to the union, TypeScript automatically requires a matching component slot in this map.

Each slot resolves to ApplyComponent<F, InputComponentProps<MatchingFieldDef>>, which means the component must accept the input props for that specific field type. This gives the component full autocomplete for field-specific properties (e.g. fieldDef.max on the text slot).

F extends ComponentHKT

TFieldMeta extends BaseFieldMeta = BaseFieldMeta