UnifiedSelectionTreeEventHandler Class
Deprecated in 5.7. All tree-related APIs have been deprecated in favor of the new generation hierarchy
building APIs (see https://github.com/iTwin/presentation/blob/33e79ee8d77f30580a9bab81a72884bda008db25/README.md#the-packages).
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
Methods
Name | Description | |
---|---|---|
constructor(params: UnifiedSelectionTreeEventHandlerParams): UnifiedSelectionTreeEventHandler | ||
[dispose](): void | Disposes this event handler | |
createKeysForSelection(nodes: TreeNodeItem[], _selectionType: SelectionChangeType): Keys Protected | Returns node keys that should be added, removed or used to replace unified selection. | |
dispose(): void | Deprecated | |
getKeys(nodes: TreeNodeItem[]): Keys Protected | ||
getNodeKey(node: TreeNodeItem): NodeKey Protected | Deprecated | |
onSelectionModified(__namedParameters: TreeSelectionModificationEventArgs): undefined | Subscription | Selects and deselects nodes until event is handled, handler is disposed or selection replaced event occurs. | |
onSelectionReplaced(__namedParameters: TreeSelectionReplacementEventArgs): undefined | Subscription | Replaces currently selected nodes until event is handled, handler is disposed or another selection replaced event occurs. | |
selectNodes(modelChange?: TreeModelChanges): void | ||
shouldSelectNode(node: TreeNodeItem, selection: Readonly<KeySet>): boolean Protected | Determines if node should be selected. |
Defined in
Last Updated: 17 December, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.