1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-21 19:37:28 +00:00

optimize tag editor ui (#7647)

* optimize tag editor ui

* optimize selection by up/down key

* optimize popover position

* fix searched tree nodes folding

---------

Co-authored-by: zhouwenxuan <aries@Mac.local>
This commit is contained in:
Aries
2025-03-28 11:45:17 +08:00
committed by GitHub
parent 0abb343b4b
commit 005ddb4dca
6 changed files with 401 additions and 79 deletions

View File

@@ -185,3 +185,16 @@ export const getTreeChildNodes = (parentNode, tree) => {
}
return childNodes;
};
export const getNodesWithAncestors = (node, tree) => {
const nodeKey = getTreeNodeKey(node);
let nodesWithAncestors = [];
tree.forEach((node, i) => {
if (!nodeKey.includes(getTreeNodeKey(node))) {
return;
}
nodesWithAncestors.push({ ...node, node_index: i });
});
return nodesWithAncestors;
};