UNPKG

synapse-react-client

Version:

[![npm version](https://badge.fury.io/js/synapse-react-client.svg)](https://badge.fury.io/js/synapse-react-client) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettie

37 lines (36 loc) 825 B
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