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 > findPreviousNode

findPreviousNode() function

Finds the previous node in a focus tree in focus order

Signature:
export declare function findPreviousNode(
  root: Node,
  from: string
): string | null

Parameters

ParameterTypeDescription
rootNodefocus tree
fromstringid of the current document
Returns:

string | null

the id of the previous document if it exists (null otherwise)