Skip to main content

FormPrimitivesOptions

Shared defaults supplied to createFormPrimitives().

Import

import type { FormPrimitivesOptions } from '@ngblocks/form-nodes';

When to use it

Use for the defaults supplied to createFormPrimitives(). Per-node declarations can still provide their own options where supported.

Declaration

type FormPrimitivesOptions<TNullable extends boolean | undefined = boolean | undefined> = {
syncInputs?: false | 'declared' | 'all' | 'signal-controls' | readonly SyncInputName[] | {
inputs: 'declared' | 'all' | readonly SyncInputName[];
target?: 'all' | 'signal-controls' | 'cva' | undefined;
} | null | undefined;
bindInputOutputPairs?: boolean | null | undefined;
nullable?: TNullable;
validatorMessages?: ValidatorMessages | (() => ValidatorMessages | undefined);
inheritInjector?: boolean;
adoptBindingInjector?: boolean;
};

Type parameters

ParameterConstraintDefault
TNullableboolean | undefinedboolean | undefined

Declared members

The declaration above also includes inherited contracts and overloads where applicable.

MemberMeaning
syncInputsReactively copies node state and constraints into matching custom-control inputs. This is one-way node-to-component synchronization; it does not enable value binding, execute validators, or alter node state. Use bindInputOutputPairs separately for input/output value pairs.
bindInputOutputPairsConnects recognized value/valueChange or checked/checkedChange input/output pairs. CVAs and actual model signals keep priority. Enabling a pair connects values and interaction hooks; optional state inputs are selected independently by syncInputs.
nullableDefault nullability for fields created by this primitive set.
validatorMessagesDefault built-in validator messages for nodes created by these factories.
inheritInjectorDefault injector-inheritance policy for nodes created by these factories.
adoptBindingInjectorDefault host-injector adoption policy for nodes created by these factories.