UNPKG

@minoru/react-dnd-treeview

Version:

A draggable / droppable React-based treeview component.

4 lines (3 loc) 207 B
import type { NodeModel } from "../types"; /** Get all parental nodes of the given node id. */ export declare function getParents<T = unknown>(treeData: NodeModel<T>[], id: NodeModel["id"]): NodeModel<T>[];