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