Packages > fluid-framework > TreeViewEvents

TreeViewEvents Interface

Events for TreeView .

Signature

export interface TreeViewEvents

Methods

Method Return Type Description
afterBatch() void A batch of changes has finished processing and the view has been updated.
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 root has changed. This includes going into or out of an error state where the root is unavailable due to stored schema changes. 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.

Method Details

afterBatch

A batch of changes has finished processing and the view has been updated.

Signature

afterBatch(): void;

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

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

root has changed. This includes going into or out of an error state where the root is unavailable due to stored schema changes. 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.

Signature

rootChanged(): void;