synapse-react-client
Version:
[](https://badge.fury.io/js/synapse-react-client) [](https://github.com/prettier/prettie
37 lines (36 loc) • 825 B
JavaScript
import { useMemo as p } from "react";
const m = (i, e, s, u, c, n) => p(() => {
const r = i[e];
if (!r) return [];
if (s)
return n(e, /* @__PURE__ */ new Set());
{
const t = [];
if (u[e] && r.children) {
r.children.forEach((a) => {
const h = n(
a.entityHeader.id,
/* @__PURE__ */ new Set()
);
t.push(...h);
});
const o = c[e];
o && t.push({
entityId: "",
// Empty placeholder for load more rows
entityHeader: r.entityHeader,
depth: 0,
isLeaf: !0,
parentId: e,
versionNumber: r.entityHeader.versionNumber,
isLoadMore: !0,
pageToken: o
});
}
return t;
}
}, [i, e, n, s, u, c]);
export {
m as useTableData
};
//# sourceMappingURL=useTableData.js.map