The API reference is a Work in Progress and will be continuously improved and extended. We'd love to hear your feedback in our documentation repository.
Home > @edtr-io/store > findParent
findParent() function
Finds the parent node of an id in the focus tree
Signature:export declare function findParent(root: Node, id: string): Node | null
Parameters
Parameter | Type | Description |
---|---|---|
root | Node | focus tree |
id | string | id of the current node |
Node | null
the Node
of the parent, if the id exists in the focus tree. (null
otherwise)