Generate drag preview for node library nodes (#2387)

This commit is contained in:
Chenlei Hu
2025-01-30 11:11:22 -08:00
committed by GitHub
parent d3a6baf8cd
commit 8ef3b87e59
4 changed files with 29 additions and 4 deletions

View File

@@ -25,6 +25,11 @@ export interface TreeExplorerNode<T = any> {
) => void | Promise<void>
/** Whether the node is draggable */
draggable?: boolean
/** Function to render a drag preview */
renderDragPreview?: (
node: TreeExplorerNode<T>,
container: HTMLElement
) => void | (() => void)
/** Whether the node is droppable */
droppable?: boolean
/** Function to handle dropping a node */