ant-design / ant-design/pro-components
🧐[问题]ProDescriptions中valueType为textarea时编辑模式的input大小不正确
- Dominant language
- TypeScript
- Stars
- 4.8k
- Forks
- 1.4k
- Avg merge
- 10h 44m
- Merged PRs (30d)
- 3
Description
提问前先看看:
https://github.com/ryanhanwu/How-To-Ask-Questions-The-Smart-Way/blob/main/README-zh_CN.md
### 🧐 问题描述
`ProDescriptions`中`valueType`为`textarea`时编辑模式的`input`大小不正确,编辑模式下的``组件能够正确接受`rows`参数作,但是当设置`width: 100%`的时候,由于外层包裹了无长度的`div`,造成样式无变化。此外,使用`renderFormItem`进行自定义也是一样的。
### 💻 示例代码
现有的`columns`中对应字段的定义
```
{
label: '个人简介',
dataIndex: 'introduction',
valueType: 'textarea',
span: 2,
fieldProps: {
rows: 10,
style: {
minWidth: '100%',
width: '100%',
},
},
}
```
### 🚑 其他信息
<img width="1341" height="423" alt="Image" src="https://github.com/user-attachments/assets/27d60ee8-4af7-49d9-86b0-5254a359da03" />
<img width="1328" height="353" alt="Image" src="https://github.com/user-attachments/assets/812acb46-d899-497f-8ec0-2adb44a591b3" />
Contributor guide
Research direction
Start by reproducing the ProDescriptions edit-mode case with valueType set to textarea, rows set to 10, and the supplied width and minWidth styles. Compare the behavior with a renderFormItem customization as described. Done means the textarea's rendered input size responds correctly to the column and fieldProps sizing in both cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100