dynamic-forms / Function

buildBaseInputs

Builds base input properties from a field definition.

This is a helper function that extracts common field properties. Used by mappers to build the inputs record.

Presentation

function buildBaseInputs(
  fieldDef: FieldDef<unknown, FieldMeta>,
  defaultProps?: Record<string, unknown> | undefined,
): Record<string, unknown>;

Returns

Record<string, unknown> -

Record of input names to values

Parameters

NameTypeDescription
fieldDef
FieldDef<unknown, FieldMeta>

The field definition to extract properties from

defaultProps
Record<string, unknown> | undefined

Optional form-level default props to merge with field props