UNPKG

@1771technologies/lytenyte-pro

Version:

Blazingly fast headless React data grid with 100s of features.

11 lines (10 loc) 362 B
import { isBranchNode } from "./is-branch-node.js"; export function getParentNode(el) { let current = el.parentElement; while (current && !current.getAttribute("data-ln-tree-panel") && !isBranchNode(current)) { current = current.parentElement; } if (current?.getAttribute("data-ln-tree-panel")) return null; return current; }