优化BasicSelectTree
parent
20f3ff46a9
commit
25371cab89
|
|
@ -51,8 +51,8 @@ function BasicSelectTree(props) {
|
||||||
}
|
}
|
||||||
onGetNodePaths?.(arrayObjectDeduplication(parentNodes, idKey));
|
onGetNodePaths?.(arrayObjectDeduplication(parentNodes, idKey));
|
||||||
onGetLabel?.(label);
|
onGetLabel?.(label);
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
const parentNodes = getTreeNodePaths({
|
const parentNodes = getTreeNodePaths({
|
||||||
data: treeData,
|
data: treeData,
|
||||||
targetId: value,
|
targetId: value,
|
||||||
|
|
@ -63,6 +63,7 @@ function BasicSelectTree(props) {
|
||||||
onGetNodePaths?.(parentNodes);
|
onGetNodePaths?.(parentNodes);
|
||||||
onGetLabel?.(parentNodes[parentNodes.length - 1][nameKey]);
|
onGetLabel?.(parentNodes[parentNodes.length - 1][nameKey]);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
onGetNodePaths?.([]);
|
onGetNodePaths?.([]);
|
||||||
onGetLabel?.("");
|
onGetLabel?.("");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue