This commit is contained in:
Rizky 2023-10-17 20:40:36 +07:00
parent ddbe91f17a
commit 2d228cf2f7
3 changed files with 4 additions and 1 deletions

View File

@ -107,6 +107,7 @@ export const LiveGlobal = {
}>(),
treePending: null as null | Promise<void>,
treeMeta: {} as Record<string, ItemMeta>,
cachedParentID: {} as Record<string, string>,
portal: {} as Record<string, { el?: ReactNode; render: () => void }>,
comps: {
pending: {} as Record<string, Promise<PRASI_COMPONENT>>,

View File

@ -94,7 +94,7 @@ const walk = async (
const meta: ItemMeta = {
item,
parent_id: val.parent_id,
parent_id: p.cachedParentID[item.id] || val.parent_id,
parent_comp: val.parent_comp as any,
className: produceCSS(item, {
mode: p.mode,

View File

@ -77,6 +77,8 @@ export const treePropEval = (
const meta = p.treeMeta[prop.content.id];
if (meta) {
meta.parent_id = parent_id;
p.cachedParentID[prop.content.id] = parent_id;
return (
<LItem
id={prop.content.id}