From ababe7943ba827a47618de1421a0e35f74a6afc4 Mon Sep 17 00:00:00 2001 From: huangkairan <56213366+huangkairan@users.noreply.github.com> Date: Fri, 28 Jun 2024 15:22:18 +0800 Subject: [PATCH] Update src/TreeSelect.tsx Co-authored-by: afc163 --- src/TreeSelect.tsx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/TreeSelect.tsx b/src/TreeSelect.tsx index a35e8b23..b71102b8 100644 --- a/src/TreeSelect.tsx +++ b/src/TreeSelect.tsx @@ -368,11 +368,7 @@ const TreeSelect = React.forwardRef((props, ref) // Fill missing label & status if (entity) { - if (treeTitleRender) { - rawLabel = treeTitleRender(entity.node); - } else { - rawLabel = rawLabel ?? getLabel(entity.node); - } + rawLabel = treeTitleRender ? treeTitleRender(entity.node) : rawLabel ?? getLabel(entity.node); rawDisabled = entity.node.disabled; } else if (rawLabel === undefined) { // We try to find in current `labelInValue` value