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

🐛合并单元格在滚动后出现异常 #3032

Closed
2 of 5 tasks
wyh888 opened this issue Dec 12, 2024 · 2 comments
Closed
2 of 5 tasks

🐛合并单元格在滚动后出现异常 #3032

wyh888 opened this issue Dec 12, 2024 · 2 comments
Assignees
Labels
next 2.0-next 版本的问题

Comments

@wyh888
Copy link
Contributor

wyh888 commented Dec 12, 2024

🏷 Version

Package Version
@antv/s2 v2.0.0-next.33
@antv/s2-react v2.0.0-next.31

Sheet Type

  • PivotSheet
  • TableSheet
  • GridAnalysisSheet
  • StrategySheet
  • EditableSheet

🖋 Description

设置合并单元格生效后,滚动表格,再滚动回合并单元格的位置,发现合并的样式出现异常且不可预计
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
          },
        ]
      ],
    };

🔗 Reproduce Link

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

🤔 Steps to Reproduce

😊 Expected Behavior

😅 Current Behavior

💻 System information

Environment Info
System
Browser
@github-actions github-actions bot added the next 2.0-next 版本的问题 label Dec 12, 2024
@lijinke666 lijinke666 self-assigned this Dec 17, 2024
@lijinke666
Copy link
Member

最新版本 (@antv/s2-v2.1.4) 未复现

image

@wyh888
Copy link
Contributor Author

wyh888 commented Dec 17, 2024

最新版本 (@antv/s2-v2.1.4) 未复现

image

@lijinke666 麻烦大佬再看一下,我拉取最新的代码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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
next 2.0-next 版本的问题
Projects
None yet
Development

No branches or pull requests

2 participants