UNPKG

@1771technologies/lytenyte-pro

Version:

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

15 lines (14 loc) 448 B
const invalidItemKind = "Invalid set action items, 'kind' must be 'leaf' or 'parent'"; export function checkSetActionItemKinds(p) { if (!p.items?.length) return true; const items = p.items; for (let i = items.length - 1; i >= 0; i--) { const x = items[i]; if (x.kind !== "leaf" && x.kind !== "parent") { console.error(invalidItemKind, p); return false; } } return true; }