Skip to main content

Introducing Workflow Engine, try for FREE workflowengine.io.

Function: findTreeElementDepth()

findTreeElementDepth<T>(value, element?, depth?): undefined | number

Finds the depth of a given element in a tree. Internal use only.

Type Parameters

T

T extends object

Parameters

value

T

the root of the tree.

element?

T

the element to find the depth of.

depth?

number = 0

the current depth of the tree (optional, default is 0).

Returns

undefined | number

the depth of the element in the tree, or undefined if the element is not found.

Stay in the know
Quickly Build Drag-and-Drop Forms
Star us on GitHub