Skip to main content

NodeChangedData Interface

Data included for nodeChanged.

This API is provided as a beta preview and may change without notice.

To use, import via fluid-framework/beta.

For more information about our API support guarantees, see here.

Signature

/** @sealed */
export interface NodeChangedData<TNode extends TreeNode = TreeNode>

Type Parameters

Parameter Constraint Default Description
TNode TreeNode TreeNode

Properties

Property Alerts Modifiers Type Description
changedProperties Beta optional, readonly ReadonlySet<TNode extends WithType<string, NodeKind.Object, infer TInfo> ? string & keyof TInfo : string> When the node changed is an object or Map node, this lists all the properties which changed.

Property Details

changedProperties

When the node changed is an object or Map node, this lists all the properties which changed.

This API is provided as a beta preview and may change without notice.

To use, import via fluid-framework/beta.

For more information about our API support guarantees, see here.

Signature

readonly changedProperties?: ReadonlySet<TNode extends WithType<string, NodeKind.Object, infer TInfo> ? string & keyof TInfo : string>;

Type: ReadonlySet<TNode extends WithType<string, NodeKind.Object, infer TInfo> ? string & keyof TInfo : string>

Remarks

This only includes changes to the node itself (which would trigger nodeChanged(unstable)).

Set to undefined when the NodeKind does not support this feature (currently just ArrayNodes).

When defined, the set should never be empty, since nodeChanged will only be triggered when there is a change, and for the supported node types, the only things that can change are properties.