Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

form 表单项有校验信息时 extra 出现非预期的间距 #50026

Closed
xsbear opened this issue Jul 23, 2024 · 5 comments
Closed

form 表单项有校验信息时 extra 出现非预期的间距 #50026

xsbear opened this issue Jul 23, 2024 · 5 comments
Labels
🐛 Bug Ant Design Team had proved that this is a bug. Inactive

Comments

@xsbear
Copy link

xsbear commented Jul 23, 2024

Reproduction link

Edit on StackBlitz

Steps to reproduce

使用官方文档中的注册新用户表单case,通过design token设置 itemMarginBottom 或用自定义样式覆盖 .ant-form-item的margin-bottom, 超出默认的24px,当表单项验证错误,显示校验文本时,表单项的 extra 距离校验文本多出了 item margin-bottom的间距,这应该是不符合预期的,原因是与校验文本同级的div中多出了一个div,内联设置高度为 item的 margin-bottom

What is expected?

extra与校验文本元素间不应该有item margin-bottom 的间距

What is actually happening?

extra与校验文本元素间出现了 item margin-bottom 的间距

Environment Info
antd 5.19.3
React react
System Mac
Browser Chrome
Copy link

stackblitz bot commented Jul 23, 2024

Fix this issue in StackBlitz Codeflow Start a new pull request in StackBlitz Codeflow.

@xsbear xsbear changed the title form 表单项有校验信息时 extra 出现非预期的margin form 表单项有校验信息时 extra 出现非预期的间距 Jul 23, 2024
@xsbear
Copy link
Author

xsbear commented Jul 23, 2024

如下图所示:
image

@MadCcc MadCcc added 🐛 Bug Ant Design Team had proved that this is a bug. and removed unconfirmed labels Jul 24, 2024
@clydee-geng
Copy link

I'm following up on this

@hongzzz
Copy link
Contributor

hongzzz commented Aug 13, 2024

I'm following up on this

Are you still working on this issue? @clydee-geng

@clydee-geng
Copy link

I'm following up on this

Are you still working on this issue? @clydee-geng

I don't have a new solution for the time being, you can take over

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
🐛 Bug Ant Design Team had proved that this is a bug. Inactive
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants