ant-design / pro-components

🏆 Use Ant Design like a Pro!
https://pro-components.antdigital.dev
MIT License
4.3k stars 1.36k forks source link

🐛[BUG]在 columns中定义textArea属性时在 ProDescription中报警告 #8524

Closed ray0324 closed 3 months ago

ray0324 commented 4 months ago

提问前先看看:

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

🐛 bug 描述

在 columns中定义textArea属性时在 ProDescription中报警告

    {
      title: '角色描述',
      dataIndex: 'description',
      hideInSearch: true,
      valueType: 'textarea',
      fieldProps: {
        autoSize: { minRows: 2, maxRows: 3 },
      },
      formItemProps: {
        tooltip: '系统角色描述',
        rules: [
          {
            required: true,
            message: '名称为必填项',
          },
        ],
      },
    },
image

🏞 期望结果

💻 复现代码

© 版本信息

fnoopv commented 4 months ago

https://github.com/ant-design/pro-components/blob/9e934319fffc3b6e8155dbd25d76128dcc8138bd/packages/field/src/components/TextArea/readonly.tsx#L35-L41 只读时把fieldProps的所有值传递给span了,span元素没有autoSize 所以报错了