pro-components icon indicating copy to clipboard operation
pro-components copied to clipboard

🐛[BUG] ProFormList为空时并且禁用添加按钮渲染多余的dom

Open hans000 opened this issue 1 year ago • 2 comments

提问前先看看:

https://github.com/ryanhanwu/How-To-Ask-Questions-The-Smart-Way/blob/main/README-zh_CN.md

🐛 bug 描述

把添加按钮禁用,还会保留一个控件的高度 image

📷 复现步骤

<ProFormList name={'list'} > <ProFormText name={'name'}/> </ProFormList> <ProFormList name={'list2'} creatorButtonProps={false} actionRender={() => []}>

🏞 期望结果

  • 希望没有这个空元素
  • 能否提供一个render当空列表时渲染,类似Table的

💻 复现代码

© 版本信息

  • ProComponents 版本: [e.g. 4.0.0]
  • umi 版本
  • 浏览器环境
  • 开发环境 [e.g. mac OS]

🚑 其他信息

hans000 avatar Jan 30 '24 09:01 hans000

Hello @hans000. We totally like your proposal/feedback, welcome to send us a Pull Request for it. Please provide changelog/TypeScript/documentation/test cases if needed and make sure CI passed, we will review it soon. We appreciate your effort in advance and looking forward to your contribution!

你好 @hans000,我们完全同意你的提议/反馈,欢迎直接在此仓库 创建一个 Pull Request 来解决这个问题。请务必提供改动所需相应的 changelog、TypeScript 定义、测试用例、文档等,并确保 CI 通过,我们会尽快进行 Review,提前感谢和期待您的贡献。

giphy

github-actions[bot] avatar Jan 31 '24 10:01 github-actions[bot]

看起来是 antd 默认样式有个最小高度导致的 情况还比较特殊,只有当 creatorButtonProps = false 并且没有初始值的时候才会复现,有初始值也没问题 image

ONLY-yours avatar Feb 01 '24 09:02 ONLY-yours