UNPKG

@1771technologies/lytenyte-pro

Version:

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

8 lines (7 loc) 317 B
import { getFocusableNodes } from "../utils/get-focusable-nodes.js"; import { isTreeNodeDisabled } from "../utils/is-tree-node-disabled.js"; export function getLastNode(panel) { const focusables = getFocusableNodes(panel); const first = focusables.findLast((c) => !isTreeNodeDisabled(c)); return first; }