API Reference > presentation-components > Tree > UnifiedSelectionTreeEventHandler UnifiedSelectionTreeEventHandler Class 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 IDisposable Methods Name Description constructor(params: UnifiedSelectionTreeEventHandlerParams): UnifiedSelectionTreeEventHandler createKeysForSelection(nodes: TreeNodeItem[], _selectionType: SelectionChangeType): Keys 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): NodeKey Protected onSelectionModified(__namedParameters: TreeSelectionModificationEventArgs): undefined | Subscription onSelectionReplaced(__namedParameters: TreeSelectionReplacementEventArgs): undefined | 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: TreeCheckboxStateChangeEventArgs): undefined | Subscription TreeEventHandler Changes nodes checkbox states. onDelayedNodeClick(__namedParameters: TreeNodeEventArgs): void TreeEventHandler Activates node editing if editing parameters are supplied and node is editable. onNodeCollapsed(__namedParameters: TreeNodeEventArgs): void TreeEventHandler Collapses node onNodeEditorActivated(__namedParameters: TreeNodeEventArgs): void TreeEventHandler Activates node editing if editing parameters are supplied and node is editable. onNodeExpanded(__namedParameters: TreeNodeEventArgs): void TreeEventHandler Expands node and starts loading children. Properties Name Type Description modelSource Accessor ReadOnly TreeModelSource Defined in presentation/components/src/presentation-components/tree/controlled/UseUnifiedSelection.ts Line 58 Last Updated: 12 June, 2024