Interface: GroupNode<Shape>
Defined in: core/src/nodes/node-types.ts:292
A node of a group. Paths given to field, group and array are relative and checked one segment at a time.
Extends
Type Parameters
| Type Parameter |
|---|
Shape |
Properties
| Property | Modifier | Type | Description | Inherited from | Defined in |
|---|---|---|---|---|---|
array | readonly | <Path>(path) => ArrayNode<ShapeAtPath<Shape, Path>> | The node at a path, as an array with items and operations. | - | core/src/nodes/node-types.ts:302 |
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 |
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 |
field | readonly | <Path>(path) => FieldNode<DraftOf<ShapeAtPath<Shape, Path>>, OutputOf<ShapeAtPath<Shape, Path>>> | The node at a path, as one value. | - | core/src/nodes/node-types.ts:296 |
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 |
group | readonly | <Path>(path) => GroupNode<ShapeAtPath<Shape, Path>> | The node at a path, as a group. | - | core/src/nodes/node-types.ts:300 |
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<DraftOf<Shape>> | - | 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 |
summaryId | readonly | string | Id for an error summary element, focused by a submit with shouldFocusError: 'summary'. | - | core/src/nodes/node-types.ts:294 |
validate | readonly | () => Promise<ValidationResult<OutputOf<Shape>>> | 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 |