UNPKG

@1771technologies/lytenyte-pro

Version:

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

16 lines (15 loc) 450 B
import { useEvent } from "@1771technologies/lytenyte-core/internal"; export function useRowSiblings(source) { const rowChildren = useEvent((id) => { const node = source.tree.rowIdToNode.get(id); const parent = node?.parent; if (!parent) return []; const ids = []; parent.byIndex.forEach((n) => { ids.push(n.row.id); }); return ids; }); return rowChildren; }