TreeStatus Enum
Status of the tree that a particular node belongs to.
Signature
export declare enum TreeStatus
Flags
Flag | Description |
---|---|
Deleted | Is removed and cannot be added back to the original document tree. |
InDocument | Is parented under the root field. |
New | Is created but has not yet been inserted into the tree. |
Removed | Is not parented under the root field, but can be added back to the original document tree. |
Deleted
Is removed and cannot be added back to the original document tree.
Signature
Deleted = 2
InDocument
Is parented under the root field.
Signature
InDocument = 0
New
Is created but has not yet been inserted into the tree.
Signature
New = 3
Remarks
See also Unhydrated.
Nodes in the new state have some limitations:
-
Events are not currently triggered for changes. Fixes for this are planned.
-
Reading identifiers from nodes which were left unspecified (defaulted) when creating the tree will error. This is because allocating unique identifiers in a compressible manner requires knowing which tree the nodes will be inserted into.
-
Transactions do not work: transactions apply to a single TreeView, and
New
nodes are not part of one. -
Tree.shortId
(when the identifier was explicitly specified and thus works at all) will just return the full identifier as a string, but might return a compressed form as a number once hydrated.
Removed
Is not parented under the root field, but can be added back to the original document tree.
Signature
Removed = 1