Interface: FieldNode<Value, Output>
Defined in: core/src/nodes/node-types.ts:279
A node that holds one value.
Extends
NodeBase<Value,Output>
Type Parameters
| Type Parameter | Default type |
|---|---|
Value | - |
Output | Value |
Properties
| Property | Modifier | Type | Description | Inherited from | Defined in |
|---|---|---|---|---|---|
attributes | readonly | FieldAttributes | - | - | core/src/nodes/node-types.ts:284 |
blur | readonly | () => void | Marks the node as touched and starts checks that run on blur. | NodeBase.blur | core/src/nodes/node-types.ts:252 |
clearErrors | readonly | (options?) => void | Removes external errors in this subtree. Schema and rule errors follow their values. | NodeBase.clearErrors | core/src/nodes/node-types.ts:268 |
descriptionId | readonly | string | Id for a description element. | - | core/src/nodes/node-types.ts:283 |
errorId | readonly | string | Id for the error message element. aria-describedby points at it while an error is visible. | - | core/src/nodes/node-types.ts:281 |
errorMessage | readonly | string | undefined | The node's first visible error as text, from the form's formatError; undefined while none is visible. It is not cached, so a message translated in formatError follows the current language where it is read. | NodeBase.errorMessage | core/src/nodes/node-types.ts:243 |
focus | readonly | () => void | Focuses the element with this node's id, through the form's focusElement. | NodeBase.focus | core/src/nodes/node-types.ts:271 |
handleSubmit | readonly | (onValid, options?) => () => Promise<SubmitOutcome> | Returns a submit function for this node. It skips while a submit runs, validates the subtree as validate does and either shows and focuses its errors and the checks that threw, or calls onValid with the output. | NodeBase.handleSubmit | core/src/nodes/node-types.ts:262 |
id | readonly | string | DOM id: the form id and the node's path. | NodeBase.id | core/src/nodes/node-types.ts:235 |
kind | readonly | NodeKind | - | NodeBase.kind | core/src/nodes/node-types.ts:233 |
listErrors | readonly | (options?) => readonly ListedError[] | - | NodeBase.listErrors | core/src/nodes/node-types.ts:269 |
path | readonly | string | Dotted path from the root. Array items appear by their current index. | NodeBase.path | core/src/nodes/node-types.ts:237 |
reset | readonly | (options?) => void | Returns the subtree to its initial value, or makes options.value its new initial value. | NodeBase.reset | core/src/nodes/node-types.ts:264 |
setErrors | readonly | (errors, options?) => void | Sets external errors with paths relative to this node. They are visible at once. | NodeBase.setErrors | core/src/nodes/node-types.ts:266 |
setValue | readonly | (value) => void | Writes a draft value. undefined empties a field and removes its key from the parent's value. | NodeBase.setValue | core/src/nodes/node-types.ts:250 |
state | readonly | NodeState<Value> | - | NodeBase.state | core/src/nodes/node-types.ts:238 |
subscribe | readonly | (listener) => () => void | Calls the listener once after a change to this node's state or path, or once per batch. Returns a function that unsubscribes. | NodeBase.subscribe | core/src/nodes/node-types.ts:248 |
validate | readonly | () => Promise<ValidationResult<Output>> | Validates the subtree, asks its checks again, waiting for any already running, and returns the result without making errors visible. | NodeBase.validate | core/src/nodes/node-types.ts:257 |