@mantine/core
Version:
React components library focused on usability, accessibility and developer experience
12 lines (11 loc) • 464 B
TypeScript
import type { TreeNodeData } from '../Tree';
export type TreeDragDropPosition = 'before' | 'after' | 'inside';
export interface TreeDragDropPayload {
/** Value of the dragged node */
draggedNode: string;
/** Value of the target node */
targetNode: string;
/** Position relative to the target node */
position: TreeDragDropPosition;
}
export declare function moveTreeNode(data: TreeNodeData[], payload: TreeDragDropPayload): TreeNodeData[];