From e5bc644c1852e5486f8966fbf905585d3925f51e Mon Sep 17 00:00:00 2001 From: chanx <1243304602@qq.com> Date: Tue, 14 Jul 2026 15:53:54 +0800 Subject: [PATCH] fix(tree-select): avoid incorrect node selection when value is empty (#16898) ### Summary fix(tree-select): avoid incorrect node selection when value is empty Co-authored-by: Claude Opus 4.6 --- web/src/components/tree-select.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/src/components/tree-select.tsx b/web/src/components/tree-select.tsx index 1e537bfc79..ed228499fc 100644 --- a/web/src/components/tree-select.tsx +++ b/web/src/components/tree-select.tsx @@ -67,7 +67,7 @@ export function TreeSelect({ const selectedNode = useMemo(() => { const find = (nodes: TreeSelectNode[]): TreeSelectNode | undefined => { for (const node of nodes) { - if (node.id === value) return node; + if (node.id === value && value) return node; if (node.children) { const found = find(node.children); if (found) return found;