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:
@@ -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;
|
||||
};
|
||||
|
Reference in New Issue
Block a user