ant-design / pro-components

🏆 Use Ant Design like a Pro!
https://pro-components.antdigital.dev
MIT License
4.23k stars 1.35k forks source link

🐛[BUG] EditableProTable 行编辑状态时点击【取消】,导致行被删除(官网复现) #8675

Open GaoYuancheng opened 3 weeks ago

GaoYuancheng commented 3 weeks ago

提问前先看看:

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 官网第一个示例 recording

© 版本信息

🚑 其他信息

image debugger 发现 第二次点击取消时 preEditRowRef?.current 为 null 导致走了删除的逻辑

dreammaker7 commented 2 weeks ago

遇到一样的问题了,有任何修复进展或者临时解决方案吗?不然只能回退用的版本了

GaoYuancheng commented 2 weeks ago

回退把 2.7.12 版本之前应该都是好的