ant-design / ant-design/pro-components
🐛[BUG] EditableProTable 行编辑状态时点击【取消】,导致行被删除(官网复现)
- 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 描述
editable={{
type: 'multiple',
...,
}}
EditableProTable 依次点击 a行b行 的【编辑】 然后依次点击 a行b行 的【取消】,发现 b行 被删除
### 📷 复现步骤
EditableProTable 依次点击 a行b行 的【编辑】 然后依次点击 a行b行 的【取消】,发现 b行 被删除
### 🏞 期望结果
b行取消编辑状态 而不是被删除
### 💻 复现代码
https://procomponents.ant.design/components/editable-table#%E5%8F%AF%E7%BC%96%E8%BE%91%E8%A1%A8%E6%A0%BC
官网第一个示例

### © 版本信息
- ProComponents 版本: 2.7.15
- umi 版本
- 浏览器环境 Chrome 127.0.6533.122
- 开发环境
### 🚑 其他信息

debugger 发现 第二次点击取消时 preEditRowRef?.current 为 null 导致走了删除的逻辑
Contributor guide
Research direction
Start with the EditableProTable documentation's first editable-table example linked in the issue and reproduce editing rows a and b before cancelling them in sequence. Trace the cancel path around preEditRowRef, then verify that cancelling b leaves the row present and merely exits edit mode.
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
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 63/100