API Reference > presentation-components > Tree > UnifiedSelectionTreeEventHandler UnifiedSelectionTreeEventHandler Class Beta Tree event handler that handles unified selection. Extends wrapped tree event handler's functionality by adding, removing or replacing nodes in unified selection. It also reacts to unified selection changes and selects/deselects tree nodes according changes. Note: conditions used to determine if node is selected and nodes that should be added to unified selection can be controlled by overriding 'shouldSelectNode' and 'createKeysForSelection' methods. Extends TreeEventHandler Implements TreeEvents IDisposable Methods Name Description constructor(params: UnifiedSelectionTreeEventHandlerParams): UnifiedSelectionTreeEventHandler createKeysForSelection(nodes: TreeNodeItem[], _selectionType: SelectionChangeType): { T } | ReadonlyArray<{ T } | { T } | { T } | { T } | { T } | { T } | { T } | { T }> Protected Returns node keys that should be added, removed or used to replace unified selection. dispose(): void getKeys(nodes: TreeNodeItem[]): Keys Protected getNodeKey(node: TreeNodeItem): BaseNodeKey | ECInstanceNodeKey | ECInstancesNodeKey | ECClassGroupingNodeKey | ECPropertyGroupingNodeKey | LabelGroupingNodeKey Protected onSelectionModified(__namedParameters: { modifications: Observable<TreeSelectionChange> }): Subscription onSelectionReplaced(__namedParameters: { replacements: Observable<{ selectedNodeItems: TreeNodeItem[] }> }): Subscription selectNodes(modelChange?: TreeModelChanges): void shouldSelectNode(node: TreeNodeItem, selection: Readonly<KeySet>): boolean Protected Determines if node should be selected. Inherited methods Name Inherited from Description onCheckboxStateChanged(__namedParameters: { stateChanges: Observable<CheckboxStateChange[]> }): Subscription | undefined TreeEventHandler Changes nodes checkbox states. onDelayedNodeClick(__namedParameters: { nodeId: string }): void TreeEventHandler Activates node editing if editing parameters is supplied and node is editable. onNodeCollapsed(__namedParameters: { nodeId: string }): void TreeEventHandler Collapses node onNodeExpanded(__namedParameters: { nodeId: string }): void TreeEventHandler Expands node and starts loading children. Properties Name Type Description modelSource Accessor ReadOnly TreeModelSource Defined in presentation/components/src/tree/controlled/UseUnifiedSelection.ts Line 50 Last Updated: 13 June, 2024