Skip to content

[Select] 自定义渲染的label需要进行容错处理 #2812

@kajweb

Description

@kajweb

tdesign-react 版本

1.5.3(react-dom@18.2.0)(react@18.2.0)

重现链接

重现步骤

开启搜索,并将label设置为ReactNode:如label={<>{option.label}</>}
在页面中进行搜索

期望结果

正常搜索

实际结果

搜索异常

框架版本

No response

浏览器版本

No response

系统版本

No response

Node版本

No response

补充说明

src/select/base/Select.tsx

第240行附近,对label进行了toUpperCase的操作

filteredOptions = tmpPropOptions.filter((option) => (option?.label || '').toUpperCase().includes(upperValue)); // 不区分大小写

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions