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}
onOpenChange={(open) => {
if (!open) {
syncronize(mprops as any, JSON.parse(local.json));
treeRebuild(p);
p.render();
} else {
local.json = JSON.stringify(mprops?.toJSON(), null, 2);
try {
if (!open) {
syncronize(mprops as any, JSON.parse(local.json));
treeRebuild(p);
p.render();
} else {
local.json = JSON.stringify(mprops?.toJSON(), null, 2);
}
} catch (e) {
console.log(e);
}
local.open = open;
local.render();