@@ -8,6 +8,7 @@ import type { InnerSelectorProps } from '.';
8
8
import Input from './Input' ;
9
9
import useLayoutEffect from '../hooks/useLayoutEffect' ;
10
10
import type { DisplayValueType , RenderNode , CustomTagProps , RawValueType } from '../BaseSelect' ;
11
+ import { getTitle } from '../utils/commonUtil' ;
11
12
12
13
function itemKey ( value : DisplayValueType ) {
13
14
return value . key ?? value . value ;
@@ -89,7 +90,7 @@ const SelectSelector: React.FC<SelectorProps> = (props) => {
89
90
// ===================== Render ======================
90
91
// >>> Render Selector Node. Includes Item & Rest
91
92
function defaultRenderSelector (
92
- title : React . ReactNode ,
93
+ item : DisplayValueType ,
93
94
content : React . ReactNode ,
94
95
itemDisabled : boolean ,
95
96
closable ?: boolean ,
@@ -100,9 +101,7 @@ const SelectSelector: React.FC<SelectorProps> = (props) => {
100
101
className = { classNames ( `${ selectionPrefixCls } -item` , {
101
102
[ `${ selectionPrefixCls } -item-disabled` ] : itemDisabled ,
102
103
} ) }
103
- title = {
104
- typeof title === 'string' || typeof title === 'number' ? title . toString ( ) : undefined
105
- }
104
+ title = { getTitle ( item ) }
106
105
>
107
106
< span className = { `${ selectionPrefixCls } -item-content` } > { content } </ span >
108
107
{ closable && (
@@ -167,7 +166,7 @@ const SelectSelector: React.FC<SelectorProps> = (props) => {
167
166
168
167
return typeof tagRender === 'function'
169
168
? customizeRenderSelector ( value , displayLabel , itemDisabled , closable , onClose )
170
- : defaultRenderSelector ( label , displayLabel , itemDisabled , closable , onClose ) ;
169
+ : defaultRenderSelector ( valueItem , displayLabel , itemDisabled , closable , onClose ) ;
171
170
}
172
171
173
172
function renderRest ( omittedValues : DisplayValueType [ ] ) {
0 commit comments