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

🐛使用 asyncGetAllPlainData 导出的数据与表格渲染结果不一致 #2808

Closed
1 of 5 tasks
KzqKzq opened this issue Jul 4, 2024 · 3 comments · Fixed by #2810
Closed
1 of 5 tasks

🐛使用 asyncGetAllPlainData 导出的数据与表格渲染结果不一致 #2808

KzqKzq opened this issue Jul 4, 2024 · 3 comments · Fixed by #2810
Assignees
Labels
next 2.0-next 版本的问题 released on @next

Comments

@KzqKzq
Copy link

KzqKzq commented Jul 4, 2024

🏷 Version

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

Sheet Type

  • PivotSheet
  • TableSheet
  • GridAnalysisSheet
  • StrategySheet
  • EditableSheet

🖋 Description

问题:需要对所有原始值为空的单元格进行自定义格式化,(包含对维度值为null的colCell 进行格式化)并且按照格式化的内容进行导出,为了实现这个功能发现了下面的问题:

  1. 问题1列维度值中有null的情况下,默认的占位符函数不生效 (好像s2默认将维度值转换成了字符串,导致占位符不生效)
    image
  2. 问题2为了尝试解决问题1,配置了 S2DataConfig.meta 的格式化函数,发现列维度单元格无法获取对应的原始值;
  3. 问题3 dataCell 在配置了占位符以及开启了asyncGetAllPlainDataformatOptions: true 情况下导出的结果占位符没有正常导出

⌨️ Code Snapshots

image
image

🔗 Reproduce Link

https://codesandbox.io/p/sandbox/pagination-forked-dsxzpp?file=%2Findex.html

🤔 Steps to Reproduce

😊 Expected Behavior

  1. 问题1列维度值中有null的情况下,希望默认的占位符函数能够生效;
  2. S2DataConfig.meta 的格式化函数,可以获取列维度单元格对应的原始值;
  3. dataCell 在配置了占位符以及开启了asyncGetAllPlainDataformatOptions: true 情况下能够正确导出占位符;

😅 Current Behavior

💻 System information

Environment Info
System window 10
Browser chrome: 126.0.6478.127
@github-actions github-actions bot added the next 2.0-next 版本的问题 label Jul 4, 2024
@lijinke666 lijinke666 self-assigned this Jul 5, 2024
@lijinke666
Copy link
Member

ref #2766

wjgogogo pushed a commit that referenced this issue Aug 5, 2024
* fix: 修复导出格式化数据时空数据占位符未生效 close #2808

* fix: 避免维值为 null 时转换成 'null'

* test:  增加单测和文档说明

* fix: 统一格式化逻辑

* test: 单测修复

* test: 更新快照
@lijinke666
Copy link
Member

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

The release is available on:

Your semantic-release bot 📦🚀

@lijinke666
Copy link
Member

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

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
next 2.0-next 版本的问题 released on @next
Projects
None yet
2 participants