ant-design / ant-design/pro-components

🐛[BUG]ProFormText和ProFormSelect设置了addonAfter之后,input和select部分的宽度变得无法控制

Open
#9,211 6 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
4.8k
Forks
1.4k
Avg merge
10h 44m
Merged PRs (30d)
3

Description

### 🐛 bug 描述

ProFormText和ProFormSelect设置了addonAfter之后,input和select部分的宽度变得无法控制

### 📷 复现步骤
就给ProFormSelect 或者是ProFormText设置addonAfter后就会出现这种问题

### 🏞 期望结果
希望select部分的宽度可以充满父级元素除了addonAfter部分的宽度,类似于给select那部分设置flex:1的效果
### 💻 复现代码

```

设置默认快递公司

}
request={async (params) => {
const response = await selectLogistics({title: params.keywords})
return response.data;
}}
rules={[{required: true, message: "请选择快递公司"}]}
/>
```

### © 版本信息

- ProComponents 版本: 2.8.9
- umi 版本:4.3.24
- 浏览器环境: chrome
- 开发环境 [e.g. mac OS] windows11 x64

### 🚑 其他信息

设置之前:

Image
设置之后:

Image

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue with ProFormText and ProFormSelect using the provided addonAfter example, then inspect the components' handling of that prop. The work is done when the input or select fills the parent width remaining after addonAfter, while the existing form behavior remains intact.

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
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.