ant-design / ant-design/pro-components

🐛[BUG] ProTable renderFormItem返回ProFormDigit组件,当编辑某一行这个组件的值为a后取消,再去编辑另外一行,此时这行这个组件的值也被回填成a了

Open
#8,708 0 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

提问前先看看:

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

### 🐛 bug 描述
1. ProTable自定义valueType如下:
![image](https://github.com/user-attachments/assets/a12cbaec-54e9-4a7d-94d0-db4894dc7db2)
2. CareerList组件定义如下:
![image](https://github.com/user-attachments/assets/0dd58af5-a3a1-42a2-91f2-01fc58264cb6)
3. 编辑ProTable某一行这个ProFormDigit自定义组件的值(设置成5),然后点取消
![image](https://github.com/user-attachments/assets/5371ea7b-3942-4cf8-9a01-f96ddcf6241b)
4. 此时,再去编辑另外一行,会发现回填的值也是5

问题:是怎么禁用这个自动回填? 非自定义的valueType就没有这个自动回填其他行缓存的值的问题。

### 📷 复现步骤

### 🏞 期望结果

### 💻 复现代码

### © 版本信息

- ProComponents 版本: [e.g. 4.0.0]
- umi 版本
- 浏览器环境
- 开发环境 [e.g. mac OS]

### 🚑 其他信息

Contributor guide

Open the contributing guide

Research direction

Start at ProTable's custom valueType/renderFormItem path and the ProFormDigit used by the CareerList component. Reproduce editing one row, cancelling, and opening another row; done means the second row does not receive the cancelled value, while the behavior of the built-in valueType remains unchanged.

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
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.