Refactor TreeExplorer (Add handleClick hook) (#867)

* Refactor TreeExplorer (Add handleClick hook)

* nit
This commit is contained in:
Chenlei Hu
2024-09-18 09:36:21 +09:00
committed by GitHub
parent e493473c35
commit a2cf6a7be2
4 changed files with 30 additions and 26 deletions

View File

@@ -24,6 +24,8 @@ export interface TreeExplorerNode<T = any> {
node: TreeExplorerNode<T>,
data: TreeExplorerDragAndDropData
) => void
// Function to handle clicking a node
handleClick?: (node: TreeExplorerNode<T>, event: MouseEvent) => void
// Function to handle errors
handleError?: (error: Error) => void
}