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

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

Open ray0324 opened this issue 1 year ago • 1 comments

提问前先看看:

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

🏞 期望结果

💻 复现代码

© 版本信息

  • ProComponents 版本: 2.7.10
  • 浏览器环境: Chrome 126.0.6478.114

ray0324 avatar Jun 26 '24 04:06 ray0324

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

fnoopv avatar Jun 26 '24 09:06 fnoopv