Skip to content

Field Controller

Each field has a FieldController.

MemberPurpose
idStable field id.
kindField kind.
configNormalized field config.
stateCurrent field state snapshot.
descriptorRenderer descriptor from the field definition.
setValue(value)Update value and mark dirty.
blur()Mark touched.
focus()Mark the active intent.
validate()Run field validation.
reset()Restore initial value.
subscribe(listener)Listen to field state changes.

FieldStateSnapshot includes value, initialValue, touched, dirty, valid, visible, disabled, readOnly, errors, and status.

const threshold = mounted.form.getField("threshold");
threshold?.setValue(0.8);
await threshold?.validate();