TreeBranchEvents Interface
Events for TreeBranch.
To use, import via @fluidframework/tree/alpha
.
For more information about our API support guarantees, see here.
Signature
/** @sealed */
export interface TreeBranchEvents
Methods
Method | Alerts | Return Type | Description |
---|---|---|---|
changed(data, getRevertible) | Alpha |
void | Fired when a change is made to the branch. Includes data about the change that is made which listeners can use to filter on changes they care about (e.g. local vs. remote changes). |
commitApplied(data, getRevertible) | Alpha |
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 |
schemaChanged() | Alpha |
void | The stored schema for the document has changed. |
Method Details
changed
Fired when a change is made to the branch. Includes data about the change that is made which listeners can use to filter on changes they care about (e.g. local vs. remote changes).
To use, import via @fluidframework/tree/alpha
.
For more information about our API support guarantees, see here.
Signature
changed(data: CommitMetadata, getRevertible?: RevertibleFactory): void;
Parameters
Parameter | Modifiers | Type | Description |
---|---|---|---|
data | CommitMetadata | information about the change | |
getRevertible | optional | RevertibleFactory | a function that allows users to get a revertible for the change. If not provided, this change is not revertible. |
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
To use, import via @fluidframework/tree/alpha
.
For more information about our API support guarantees, see here.
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. |
schemaChanged
The stored schema for the document has changed.
To use, import via @fluidframework/tree/alpha
.
For more information about our API support guarantees, see here.
Signature
schemaChanged(): void;