This commit is contained in:
Rizky 2024-03-30 16:20:39 +07:00
parent 37175f8404
commit 772e4adaae
1 changed files with 10 additions and 6 deletions

View File

@ -238,12 +238,16 @@ export const EdSidePropComp: FC<{ meta: IMeta }> = ({ meta }) => {
} }
open={local.open} open={local.open}
onOpenChange={(open) => { onOpenChange={(open) => {
if (!open) { try {
syncronize(mprops as any, JSON.parse(local.json)); if (!open) {
treeRebuild(p); syncronize(mprops as any, JSON.parse(local.json));
p.render(); treeRebuild(p);
} else { p.render();
local.json = JSON.stringify(mprops?.toJSON(), null, 2); } else {
local.json = JSON.stringify(mprops?.toJSON(), null, 2);
}
} catch (e) {
console.log(e);
} }
local.open = open; local.open = open;
local.render(); local.render();