From 1cf3179a74bf6c35216ff56bc29b65febe1180f5 Mon Sep 17 00:00:00 2001 From: Aleksei Potsetsuev Date: Fri, 15 Mar 2024 19:46:12 +0800 Subject: [PATCH] CB-3884 fix: blink empty folder message in tree --- .../core-blocks/src/Tree/TreeNode/TreeNodeNestedMessage.m.css | 2 +- .../NavigationNode/NavigationNodeNested.tsx | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/webapp/packages/core-blocks/src/Tree/TreeNode/TreeNodeNestedMessage.m.css b/webapp/packages/core-blocks/src/Tree/TreeNode/TreeNodeNestedMessage.m.css index d1e5ec397d..375640b4af 100644 --- a/webapp/packages/core-blocks/src/Tree/TreeNode/TreeNodeNestedMessage.m.css +++ b/webapp/packages/core-blocks/src/Tree/TreeNode/TreeNodeNestedMessage.m.css @@ -1,4 +1,4 @@ .treeNodeNestedMessage { composes: theme-typography--caption from global; - padding: 4px 12px; + padding: 1px 12px; } diff --git a/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/NavigationTreeNode/NavigationNode/NavigationNodeNested.tsx b/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/NavigationTreeNode/NavigationNode/NavigationNodeNested.tsx index bf10c7e011..167e79bcbc 100644 --- a/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/NavigationTreeNode/NavigationNode/NavigationNodeNested.tsx +++ b/webapp/packages/plugin-navigation-tree/src/NavigationTree/ElementsTree/NavigationTreeNode/NavigationNode/NavigationNodeNested.tsx @@ -50,6 +50,10 @@ export const NavigationNodeNested = observer( children = useDeferredValue(children); empty = useDeferredValue(empty); + if (empty && !treeContext?.tree.settings?.foldersTree) { + return null; + } + if (nodeId !== undefined && rootFolder) { return ; }