ant-design / ant-design/pro-components
🧐[问题]ModalForm用于修改的时候request重复请求同一数据导致表单不更新
Open
- Dominant language
- TypeScript
- Stars
- 4.8k
- Forks
- 1.4k
- Avg merge
- 10h 44m
- Merged PRs (30d)
- 3
Description
### 🧐 问题描述
一个表格,一个ModalForm表单,点击表格的修改列会设置editId,ModalForm监听editId大于0则弹出显示
ModalForm的parmas有设置editId,并设置reqeust请求数据
操作:
点击修改数据1、点击修改数据2、点击修改数据3都正常
当我返回去点击修改数据1、点击修改数据2的时候,request也有重新请求,但是就是无法赋值给表单,表单里面的数据任然停留在数据3上?????????????
### 💻 示例代码
[https://codesandbox.io/p/sandbox/antd-pro-typjry](url)
Contributor guide
Research direction
Start with the linked CodeSandbox reproduction and trace the ModalForm flow involving editId, params, and request. Reproduce the sequence of opening records 1, 2, and 3, then returning to 1 and 2. Done means each selected record's data is assigned to the form instead of retaining record 3.
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
- 45/100