Skip to content
New issue

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

🐛[BUG] ProFormSelect在readonly模式下,传入空数组,这个字段会什么也不显示 #8848

Open
DBvc opened this issue Nov 7, 2024 · 1 comment

Comments

@DBvc
Copy link
Contributor

DBvc commented Nov 7, 2024

🐛 bug 描述

ProFormSelect组件在readonly模式下,传入空数组,这个字段的值什么也不显示
如果传入空字符串,null之类的空值,会显示'-'
虽然这个组件类型上不支持emptyText,实际试了一下,emptyText在传空字符串或者null的时候是生效的

🏞 期望结果

希望能在传空数组的情况也显示有意义的空内容,最好能一起支持emptyText
大概看了下很多组件实际都支持emptyText,只是类型和文档里没有

© 版本信息

  • ProComponents 版本: 2.17.1
  • 浏览器环境 chrome 130
  • 开发环境 mac os
@cycleccc
Copy link
Contributor

proField 下的组件都可以使用 emptyText 属性,但是对应的 type 没加上
https://github.com/cycleccc/pro-components/blob/943212b57bbaeb67bc76bf2dfac46db53ba8630f/packages/field/src/index.tsx#L184

cycleccc added a commit to cycleccc/pro-components that referenced this issue Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants