packageDocumentation module import { CheckBoxState } from "@itwin/core-react" ; import { TreeNodeItem } from "../TreeDataProvider" ; import { Observable , Subscription } from "./Observable" ; public export interface TreeEvents { /** Called when tree node is expanded. */ onNodeExpanded ? ( event ) : void ; /** Called when tree node is collapsed. */ onNodeCollapsed ? ( event ) : void ; /** Called when selected tree node is clicked. */ onDelayedNodeClick ? ( event ) : void ; /** Called when selected tree node editor is activated. */ onNodeEditorActivated ? ( event ) : void ; /**
     * Called when tree selection is modified.
     * If Subscription is returned it can be used to stop event handling by calling `unsubscribe()`.
     */ onSelectionModified ? ( event ) : Subscription | undefined ; /**
     * Called when tree selection is replaced.
     * If Subscription is returned it can be used to stop event handling by calling `unsubscribe()`.
     */ onSelectionReplaced ? ( event ) : Subscription | undefined ; /**
     * Called when checkbox states for nodes are changed.
     * If Subscription is returned it can be used to stop event handling by calling `unsubscribe()`.
     */ onCheckboxStateChanged ? ( event ) : Subscription | undefined ; } public export interface TreeNodeEventArgs { /** Id of node that is affected by event. */ nodeId : string ; } public export interface TreeSelectionModificationEventArgs { /**
     * An observable that emits tree selection changes.
     * It starts emitting values when '.subscribe()' is called.
     */ modifications : Observable < TreeSelectionChange > ; } public export interface TreeSelectionChange { /** Tree node items that where selected. */ selectedNodeItems : TreeNodeItem [ ] ; /** Tree node items that where deselected. */ deselectedNodeItems : TreeNodeItem [ ] ; } public export interface TreeSelectionReplacementEventArgs { /**
     * An observable that emits tree selection replacements containing selected tree node items.
     * It starts emitting values when '.subscribe()' is called.
     */ replacements : Observable < { selectedNodeItems : TreeNodeItem [ ] ; } > ; } public export interface TreeCheckboxStateChangeEventArgs { /**
     * An observable that emits checkbox state changes.
     * It starts emitting values when '.subscribe()' is called.
     */ stateChanges : Observable < CheckboxStateChange [ ] > ; } public export interface CheckboxStateChange { /** Tree node item that was affected by checkbox state change. */ nodeItem : TreeNodeItem ; /** New state of the checkbox. */ newState : CheckBoxState ; }