Explorar o código

auto open when the path is '/'

Yuki Takei hai 4 meses
pai
achega
db2ebcc7d3
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      apps/app/src/client/components/TreeItem/TreeItemLayout.tsx

+ 1 - 1
apps/app/src/client/components/TreeItem/TreeItemLayout.tsx

@@ -91,7 +91,7 @@ export const TreeItemLayout = (props: TreeItemLayoutProps): JSX.Element => {
         && targetPath.startsWith(addTrailingSlash(page.path))
         && targetPath !== page.path; // Target Page does not need to be opened
 
-      if (isPathToTarget) {
+      if (page.path === '/' || isPathToTarget) {
         item.expand();
         onToggle?.();
       }