antvis / S2

⚡️ A practical visualization library for tabular analysis.

Home Page:https://s2.antv.antgroup.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

🐛@antv/s2-react 2.0.0-next.21版本, React组件内置重渲染render仍为同步模式,频繁更新组件导致渲染重影异常

riverxs opened this issue · comments

🏷 Version

Package Version
@antv/s2 2.0.0-next.21
@antv/s2-react 2.0.0-next.21
@antv/s2-vue

Sheet Type

  • PivotSheet
  • TableSheet
  • GridAnalysisSheet
  • StrategySheet
  • EditableSheet

🖋 Description

@antv/s2 与@antv/s2-react升级2.0版本后,s2的render改为异步渲染,而@antv/s2-react封装的代码内render调用方式仍为同步渲染方式,快速更新React组件导致渲染重影异常,是否应改为异步渲染(不确定)
image

⌨️ Code Snapshots

官方@antv/s2-react代码
image

修复建议:

   await s2Ref.current?.render({
      reloadData: renderOptions!.reloadData,
      reBuildDataSet: renderOptions!.reBuildDataSet,
    });

🔗 Reproduce Link

🤔 Steps to Reproduce

😊 Expected Behavior

😅 Current Behavior

💻 System information

Environment Info
System
Browser

直接来个 PR ?

快速更新React组件导致渲染重影异常

快速更新具体是指? 最好提供一个 Demo

你好 @riverxs,请提供一个可以在线访问的链接, 或者使用 codesandbox 提供示例并详细说明复现步骤 (查看更多模板), 15 天内未回复issue自动关闭。

Hello, @riverxs, please provide an accessible link or usage codesandbox to describe the reproduction steps (more template). The issue will be closed without any replay within 15 days.

🎉 This issue has been resolved in version @antv/s2-v2.0.0-next.24 🎉

The release is available on:

Your semantic-release bot 📦🚀

🎉 This issue has been resolved in version @antv/s2-react-v2.0.0-next.23 🎉

The release is available on:

Your semantic-release bot 📦🚀

🎉 This issue has been resolved in version @antv/s2-vue-v2.0.0-next.15 🎉

The release is available on:

Your semantic-release bot 📦🚀