UNPKG

@1771technologies/lytenyte-pro

Version:

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

12 lines (11 loc) 364 B
import { useEvent } from "@1771technologies/lytenyte-core/internal"; export function useRowChildren(tree) { const rowChildren = useEvent((id) => { const node = tree.rowIdToNode.get(id); if (!node) return []; const ids = [...node.children.values()].map((x) => x.row.id); return ids; }); return rowChildren; }