We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
1.5.3(react-dom@18.2.0)(react@18.2.0)
无
开启搜索,并将label设置为ReactNode:如label={<>{option.label}</>} 在页面中进行搜索
ReactNode
label={<>{option.label}</>}
正常搜索
搜索异常
No response
src/select/base/Select.tsx
第240行附近,对label进行了toUpperCase的操作
toUpperCase
filteredOptions = tmpPropOptions.filter((option) => (option?.label || '').toUpperCase().includes(upperValue)); // 不区分大小写
The text was updated successfully, but these errors were encountered:
👋 @kajweb,感谢给 TDesign 提出了 issue。 请根据 issue 模版确保背景信息的完善,我们将调查并尽快回复你。
Sorry, something went wrong.
可以暂时这样 { label: label, content: <>{{label}}</> } 来使用 具体怎么容错我们讨论一下
目前已经这样使用了。。。 但是目前的场景是content 可能会是多行,然后label会重新渲染为单行。。。但是为了好看,label也写成了ReactNode
那label写成纯string不行吗?
可以
写成纯string 暂时可以支持这个场景的使用 https://stackblitz.com/edit/react-ca1yfc?file=src%2Fdemo.jsx 如果选中项也需要定义样式 可以配合valueDisplay再进行定制
uyarn
NWYLZW
No branches or pull requests
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
的操作The text was updated successfully, but these errors were encountered: