@1771technologies/lytenyte-pro
Version:
Blazingly fast headless React data grid with 100s of features.
13 lines (12 loc) • 370 B
JavaScript
export function checkSetActionItemKeysAreValid(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 (typeof x.relIndex !== "number" || x.relIndex < 0 || Math.floor(x.relIndex) !== x.relIndex) {
return false;
}
}
return true;
}