Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛使用默认排序方法对表格排序后再编辑表格,数据更新有误 #2537

Closed
1 of 5 tasks
andersjiao opened this issue Feb 1, 2024 · 3 comments · Fixed by #2544
Closed
1 of 5 tasks
Assignees
Labels
🐛 bug 这个是一个 bug released

Comments

@andersjiao
Copy link

🏷 Version

Package Version
@antv/s2 1.54.3
@antv/s2-react 1.46.1
@antv/s2-vue

Sheet Type

  • PivotSheet
  • TableSheet
  • GridAnalysisSheet
  • StrategySheet
  • EditableSheet

🖋 Description

根据某个字段排序后,再次编辑表格内容,数据更新错误.

⌨️ Code Snapshots

由于官网demo可以重现问题,复现代码略
我看了github上editcell的实现,看上去onSave方法的实现有问题
如下图,排序后rowIndex按displayData进行了更新,保存时,使用rowIndex做为下标去更新originData,导致更新了错误的数据
antv

🔗 Reproduce Link

官网demo页面可直接复现
https://s2.antv.antgroup.com/manual/basic/analysis/editable-mode

🤔 Steps to Reproduce

操作步骤如下:
以官网demo为基础,修改后主要数据如下

province price
浙江省 1
浙江省 2
浙江省 3
浙江省 4
浙江省 5
浙江省 6
  1. 点击price按倒序排序
  2. 修改排序后的第一条数据(price=6)的province
  3. 第一条数据的province 没有被修改,最后一条数据province 被修改

😊 Expected Behavior

应该更新我选择的单元格的数据

😅 Current Behavior

更新了其他单元格的数据

💻 System information

Environment Info
System
Browser
@lijinke666 lijinke666 added the 🐛 bug 这个是一个 bug label Feb 2, 2024
Copy link
Contributor

github-actions bot commented Feb 2, 2024

你好 @andersjiao,很抱歉给你带来了不好的体验, 我们会尽快排查问题并修复, 请关注后续发布日志.

Hello, @andersjiao, We are so sorry for the bad experience. We will troubleshoot and fix the problem as soon as possible. Please pay attention to the follow-up change logs.

@lijinke666
Copy link
Member

🎉 This issue has been resolved in version @antv/s2-v1.54.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

@lijinke666
Copy link
Member

🎉 This issue has been resolved in version @antv/s2-react-v1.46.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug 这个是一个 bug released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants