Skip to main content

Node class

📖 Description

The Node class represents a node in the form definition.

🗃️ Fields


🏷️ id

Retrieves the identifier of the node.

Type

string


🏷️ index

Retrieves the zero-based index of the node in the Nodes collection.

Type

string


🏷️ isFirst

Retrieves if the node is the first node in the Nodes collection.

Type

boolean


🏷️ isLast

Retrieves if the node is the last node in the Nodes collection.

Type

boolean


🏷️ isVisible

Retrieves if the node is visible.

Type

boolean


🏷️ props

Retrieves the properties of the node.

Type

INode


🏷️ runner

Retrieves a reference to the Runner instance.

Type

Runner


🏷️ section

Retrieves the parent section.

Type

Section


🏷️ slots

Retrieves the Slots collection.

Type

Slots

▶️ Methods


🔧 block

Retrieves the block instance for the supplied context.

Signature

block(context: Context): NodeBlock | HeadlessBlock | undefined

Parameters

NameTypeOptionalDescription
contextContextNoReference to the context.

Return value

Returns the NodeBlock or HeadlessBlock instance or undefined if the block was not found.


🔧 isAwaiting

Retrieves if one or more of the slots are awaiting a value.

Signature

isAwaiting(context: Context): boolean

Parameters

NameTypeOptionalDescription
contextContextNoReference to the context.

Return value

Returns true if a slot is awaiting a value.