TreeViewEvents Interface
Events for TreeView.
This type is "sealed," meaning that code outside of the library defining it should not implement or extend it. Future versions of this type may add members or make typing of readonly members more specific.
Signature
/** @sealed */
export interface TreeViewEvents
Methods
Method | Return Type | Description |
---|---|---|
commitApplied(data, getRevertible) | void |
Fired when: - a local commit is applied outside of a transaction - a local transaction is committed The event is not fired when: - a local commit is applied within a transaction - a remote commit is applied |
rootChanged() | void |
Raised whenever root is invalidated. This includes changes to the document schema. It also includes changes to the field containing the root such as setting or clearing an optional root or changing which node is the root. This does NOT include changes to the content (fields/children) of the root node: for that case subscribe to events on the root node. |
schemaChanged() | void | The stored schema for the document has changed. This may affect the compatibility between the view schema and the stored schema, and thus the ability to use the view. |
Method Details
commitApplied
Fired when:
-
a local commit is applied outside of a transaction
-
a local transaction is committed
The event is not fired when:
-
a local commit is applied within a transaction
-
a remote commit is applied
This type is "sealed," meaning that code outside of the library defining it should not implement or extend it. Future versions of this type may add members or make typing of readonly members more specific.
Signature
commitApplied(data: CommitMetadata, getRevertible?: RevertibleFactory): void;
Parameters
Parameter | Modifiers | Type | Description |
---|---|---|---|
data | CommitMetadata | information about the commit that was applied | |
getRevertible | optional | RevertibleFactory | a function provided that allows users to get a revertible for the commit that was applied. If not provided, this commit is not revertible. |
rootChanged
Raised whenever root is invalidated.
This includes changes to the document schema. It also includes changes to the field containing the root such as setting or clearing an optional root or changing which node is the root. This does NOT include changes to the content (fields/children) of the root node: for that case subscribe to events on the root node.
This type is "sealed," meaning that code outside of the library defining it should not implement or extend it. Future versions of this type may add members or make typing of readonly members more specific.
Signature
rootChanged(): void;
schemaChanged
The stored schema for the document has changed. This may affect the compatibility between the view schema and the stored schema, and thus the ability to use the view.
This type is "sealed," meaning that code outside of the library defining it should not implement or extend it. Future versions of this type may add members or make typing of readonly members more specific.
Signature
schemaChanged(): void;
Remarks
This event implies that the old root is no longer valid, but applications need not handle that separately: rootChanged() will be fired after this event.