优化BasicSelectTree

master
LiuJiaNan 2025-12-08 10:56:59 +08:00
parent 20f3ff46a9
commit 25371cab89
1 changed files with 16 additions and 15 deletions

View File

@ -51,8 +51,8 @@ function BasicSelectTree(props) {
}
onGetNodePaths?.(arrayObjectDeduplication(parentNodes, idKey));
onGetLabel?.(label);
return;
}
else {
const parentNodes = getTreeNodePaths({
data: treeData,
targetId: value,
@ -63,6 +63,7 @@ function BasicSelectTree(props) {
onGetNodePaths?.(parentNodes);
onGetLabel?.(parentNodes[parentNodes.length - 1][nameKey]);
}
}
else {
onGetNodePaths?.([]);
onGetLabel?.("");