This commit is contained in:
Rizky 2024-07-27 18:17:56 +07:00
parent b127acfd53
commit 0806f72c69
1 changed files with 0 additions and 15 deletions

View File

@ -69,21 +69,6 @@ export const expandTreeHook = (
} }
} }
if (shouldOpen.size > 0 && local.tree) {
local.tree.open([...shouldOpen]);
local.render();
if (active.item_id) {
const meta = getMetaById(p, active.item_id);
if (meta && (meta.item as IContent).type !== "text") {
setTimeout(() => {
const el = document.getElementsByClassName(active.item_id);
if (el.length > 0) {
el[0].scrollIntoView({ behavior: "instant", block: "center" });
}
});
}
}
}
scrollTreeActiveItem(); scrollTreeActiveItem();
}, [p.page.tree, active.comp_id, active.item_id, p.ui.tree.open_all]); }, [p.page.tree, active.comp_id, active.item_id, p.ui.tree.open_all]);
}; };