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

🐛 调用 scrollWithAnimation 后,快速 unmount 表格,导致大量报错 #2316

Closed
2 of 5 tasks
LUUUAN opened this issue Aug 30, 2023 · 2 comments · Fixed by #2317
Closed
2 of 5 tasks

🐛 调用 scrollWithAnimation 后,快速 unmount 表格,导致大量报错 #2316

LUUUAN opened this issue Aug 30, 2023 · 2 comments · Fixed by #2317

Comments

@LUUUAN
Copy link
Contributor

LUUUAN commented Aug 30, 2023

🏷 Version

Package Version
@antv/s2 1.49.2
@antv/s2-react 1.42.1
@antv/s2-vue -

Sheet Type

  • PivotSheet
  • TableSheet
  • GridAnalysisSheet
  • StrategySheet
  • EditableSheet

🖋 Description

手动调用 scrollWIthAnimation 后,若快速 unmount 表格,会导致控制台出现大量报错

截屏2023-08-30 21 14 58

⌨️ Code Snapshots

在原 react playground 中 修改 onToggleRender 函数

  const onToggleRender = () => {
    if (s2Ref.current) {
      s2Ref.current.facet.scrollWithAnimation(
        {
          offsetX: {
            value: 20,
          },
          offsetY: {
            value: 20,
          },
        },
        200,
        () => {},
      );
    }
    setRender(!render);
  };

🔗 Reproduce Link

🤔 Steps to Reproduce

Toggle 渲染组件按钮,就会开始不停报错

😊 Expected Behavior

组件 unmount 后,可能会因为 spreadsheet 不存在而产生一些报错,但是目前报错无法停止,除非刷新页面

😅 Current Behavior

目前报错无法停止,除非刷新页面

💻 System information

Environment Info
System macOS Monterey 12.3
Browser Chrome 116.0
@lijinke666
Copy link
Member

🎉 This issue has been resolved in version @antv/s2-v1.50.0-alpha.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@lijinke666
Copy link
Member

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

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

Successfully merging a pull request may close this issue.

2 participants