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] ProFormList为空时并且禁用添加按钮渲染多余的dom #8137

Open
hans000 opened this issue Jan 30, 2024 · 2 comments
Open

Comments

@hans000
Copy link
Contributor

hans000 commented Jan 30, 2024

提问前先看看:

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 name={'list2'} creatorButtonProps={false} actionRender={() => []}>

🏞 期望结果

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

💻 复现代码

© 版本信息

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

🚑 其他信息

Copy link

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

@ONLY-yours
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants