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

EditableProTable: 存在校验提示信息时,希望输入框可以对齐 #8145

Open
wdyea-ya opened this issue Feb 1, 2024 · 2 comments

Comments

@wdyea-ya
Copy link

wdyea-ya commented Feb 1, 2024

提问前先看看:

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

🔩 所属模块或组件

EditableProTable

🥰 需求描述

当 errorType: 'default' 时,校验错误信息再提提示框下方,会占用一定空间导致在同一行的输入框对不齐

⛰ 功能需求适用场景

🧐 解决方案

🚑 其他信息

demo: https://codesandbox.io/p/sandbox/antd-reproduction-template-forked-f3jhwr?file=%2Findex.js

image

@SilentFlute
Copy link

SilentFlute commented Jan 21, 2025

你好, 图中这个可编辑表格中使用表单项校验的效果你是怎么实现的呢? 有代码可以参考一下吗? 链接打开之后提示找不到

@SilentFlute
Copy link

后来找到了, 谜底就在谜面上, 加一个errorType就行了, 代码如下:

    {
      title: xxx,
      dataIndex: 'aaa',
      formItemProps() {
        return {
          errorType: 'default',
          rules: [
            {
//...

然后就能实现这个效果了, 不过我在antd的文档和pro-components的文档里都没找到errorType, ts声明文件里也没找到...楼主是怎么找到的, 真厉害啊

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