dynamic-forms / Function

resolveField

Resolves a single field definition to a ResolvedField using RxJS. Loads the component asynchronously and maps inputs in the injection context.

For componentless fields (e.g., hidden fields), returns undefined since there's nothing to render. These fields still contribute to form values through the form schema.

Presentation

function resolveField(
  fieldDef: FieldDef<unknown, FieldMeta>,
  context: ResolveFieldContext,
): Observable<ResolvedField | undefined>;

Returns

Observable<ResolvedField | undefined> -

Observable that emits ResolvedField or undefined (for componentless fields or on error)

Parameters

NameTypeDescription
fieldDef
FieldDef<unknown, FieldMeta>

The field definition to resolve

context
ResolveFieldContext

The context containing dependencies for resolution