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

🐛合并单元格在滚动后出现异常(最新版本会复现) #3048

Closed
2 of 15 tasks
wyh888 opened this issue Dec 19, 2024 · 5 comments · Fixed by #3049
Closed
2 of 15 tasks

🐛合并单元格在滚动后出现异常(最新版本会复现) #3048

wyh888 opened this issue Dec 19, 2024 · 5 comments · Fixed by #3049
Assignees
Labels

Comments

@wyh888
Copy link
Contributor

wyh888 commented Dec 19, 2024

🏷 S2 Version / S2 版本

Package Version
@antv/s2 v2.1.4
@antv/s2-react v2.1.3
@antv/s2-react-components

💻 Sheet Type / 表格类型

  • PivotSheet
  • TableSheet
  • GridAnalysisSheet
  • StrategySheet
  • EditableSheet

🖋 Describe the bug / 问题描述

设置合并单元格生效后,滚动表格,再滚动回合并单元格的位置,发现合并的样式出现异常且不可预计

可查看原 issue #3032

file

⌨️ Code Snapshots / 代码片段

const s2Options: S2Options = {
      width: 600,
      height: 280,
      mergedCellsInfo: [
        [
          {
            "rowIndex": 0,
            "colIndex": 1
          },
          {
            "rowIndex": 1,
            "colIndex": 1,
            showText: true,
          },
          {
            "rowIndex": 2,
            "colIndex": 1,
          },
          {
            "rowIndex": 3,
            "colIndex": 1
          },
        ]
      ],
    };

🔗 Reproduction link / 复现链接

https://s2.antv.antgroup.com/examples/basic/table/#table

📋 Steps to Reproduce the Bug or Issue / 重现步骤

拉取最新的代码v2.1.4依然是复现的,并且官网demo也是一样的bug,需要滚动可以复现

复现案例:

  1. 官网地址:https://s2.antv.antgroup.com/examples/basic/table/#table,代码参考 issue 内容
  2. 拉取最新代码本地运行,复现如图:

1

按照下述代码修改一下 100w 数据的demo,反复滚动可出现:

const s2Options: SheetComponentOptions = {
  height: 480,
  mergedCellsInfo: [
        [
          {
            "rowIndex": 0,
            "colIndex": 1
          },
          {
            "rowIndex": 1,
            "colIndex": 1,
            showText: true,
          },
          {
            "rowIndex": 2,
            "colIndex": 1,
          },
          {
            "rowIndex": 3,
            "colIndex": 1
          },
        ]
      ],
  interaction: {
    scrollSpeedRatio: {
      vertical: 1,
      horizontal: 1,
    },
  },
  transformCanvasConfig(renderer) {
    renderer.setConfig({
      enableCulling: true,
    });
  },
};

const s2DataConfig: S2DataConfig = {
  fields: {
    // rows: [],
    columns: ['type', 'subType', 'province', 'city', 'number'],
    // values: ['number'],
  },
  data: generateRawData(
    { province: 1, city: 10 },
    { type: 10, subType: 10 },
  ),
};

// sheetType 也改成 table

😊 Expected Behavior / 期望行为

滚动后合并单元格显示正常

😅 Current Behavior / 当前行为

No response

💻 OS / 操作系统

  • macOS
  • Windows
  • Linux
  • Others / 其他

🌏 Browser / 浏览器

  • Chrome
  • Edge
  • Firefox
  • Safari (Limited support / 有限支持)
  • IE (Nonsupport / 不支持)
  • Others / 其他
Copy link
Contributor

你好 @wyh888:

提 Issue 须知

⚠️ 在提出问题前,请确保你已经仔细阅读👓/搜索🔍过 官方文档常见问题 以及 图表示例, 并且已经搜索查阅过相关 Issues 列表Discussions 列表. 当你确定自己的问题没有解决方案时,请提交 issue。 ⚠️

如果是使用问题,不知道怎么用,移步 Discussions 讨论区 并提供 有效信息 进行 提问

参与社区共建

这是一个开源项目, 我们也有繁忙的业务要做, 是用自己的业余时间在维护, 为爱发电, 精力有限, 所以有时候 issue 响应速度不是那么及时, 如果你遇到了问题, 或者对 IssuesDiscussions 列表的问题感兴趣, 可以直接认领并尝试修复 (贡献指南),帮助 S2 变得更好, 而不是一味的埋怨和催促, 我们不是甲方乙方的关系.

@lijinke666
Copy link
Member

将合并单元格滚动出可视范围后可以复现

@lijinke666 lijinke666 self-assigned this Dec 20, 2024
@lijinke666 lijinke666 added the 🐛 bug 这个是一个 bug label Dec 20, 2024
Copy link
Contributor

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

Hello, @wyh888, 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.

@zjs307065909
Copy link

合并的单元格里面的内容 跟不合并的单元格内容 好像差了几个像素 对不齐
微信截图_20241220135837

@lijinke666
Copy link
Member

🎉 This issue has been resolved in version @antv/s2-v2.1.5 🎉

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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants