mirror of
https://github.com/docmost/docmost.git
synced 2025-11-17 07:41:09 +10:00
more work on attachments
* fix frontend env usage
This commit is contained in:
@ -165,10 +165,10 @@ export default function SpaceTree({ spaceId }: SpaceTreeProps) {
|
||||
}, [isDataLoaded.current, currentPage?.id]);
|
||||
|
||||
useEffect(() => {
|
||||
if (currentPage) {
|
||||
setTimeout(() => {
|
||||
treeApiRef.current?.select(currentPage.id, { align: "auto" });
|
||||
}, 100);
|
||||
if (currentPage?.id) {
|
||||
treeApiRef.current?.select(currentPage.id, { align: "auto" });
|
||||
} else {
|
||||
treeApiRef.current?.deselectAll();
|
||||
}
|
||||
}, [currentPage?.id]);
|
||||
|
||||
@ -179,12 +179,6 @@ export default function SpaceTree({ spaceId }: SpaceTreeProps) {
|
||||
}
|
||||
}, [treeApiRef.current]);
|
||||
|
||||
useEffect(() => {
|
||||
if (location.pathname === APP_ROUTE.HOME && treeApiRef.current) {
|
||||
treeApiRef.current.deselectAll();
|
||||
}
|
||||
}, [location.pathname]);
|
||||
|
||||
return (
|
||||
<div ref={mergedRef} className={classes.treeContainer}>
|
||||
{rootElement.current && (
|
||||
|
||||
Reference in New Issue
Block a user