@momentum-ui/react-collaboration
Version:
Cisco Momentum UI Framework for React Collaboration Applications
15 lines (14 loc) • 591 B
TypeScript
import { UseVirtualTreeNavigationProps } from './Tree.types';
import './Tree.style.scss';
/**
* Handle DOM changes for virtual tree
*
* This hook manage 2 use cases:
* 1) When Virtual Tree removes active node, the hook adds a cloned node to not lose focus.
* 2) When the active node added back to the DOM, the hook invoke focus on the element and trigger
* key event if it happened on the cloned element.
*
* @param props
* @internal
*/
export declare const useVirtualTreeNavigation: ({ virtualTreeConnector, treeRef, activeNodeIdRef, }: UseVirtualTreeNavigationProps) => void;