We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 161bc8d commit 2d86044Copy full SHA for 2d86044
src/containers/Tenant/Schema/SchemaTree/SchemaTree.tsx
@@ -1,3 +1,4 @@
1
+import {useEffect} from 'react';
2
import {useDispatch} from 'react-redux';
3
4
import {NavigationTree} from 'ydb-ui-components';
@@ -48,6 +49,13 @@ export function SchemaTree(props: SchemaTreeProps) {
48
49
dispatch(getSchemaAcl({path: activePath}));
50
};
51
52
+ useEffect(() => {
53
+ // if the cached path is not in the current tree, show root
54
+ if (!currentPath.startsWith(rootPath)) {
55
+ handleActivePathUpdate(rootPath);
56
+ }
57
+ }, []);
58
+
59
return (
60
<NavigationTree
61
rootState={{
0 commit comments