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

🐛数据为 null, ‘null’和‘’ 的呈现不一致 #2833

Closed
1 of 5 tasks
misswangkang opened this issue Jul 25, 2024 · 1 comment · Fixed by #2810
Closed
1 of 5 tasks

🐛数据为 null, ‘null’和‘’ 的呈现不一致 #2833

misswangkang opened this issue Jul 25, 2024 · 1 comment · Fixed by #2810
Assignees

Comments

@misswangkang
Copy link

🏷 Version

Package Version
@antv/s2 1.47.1
@antv/s2-react
@antv/s2-vue

Sheet Type

  • PivotSheet
  • TableSheet
  • GridAnalysisSheet
  • StrategySheet
  • EditableSheet

🖋 Description

在平铺模式中,null 显示为‘null’, 'null' 显示'null', '' 显示‘-’ , 明细表下 null 和'' 都显示为‘-’
image

image
image

⌨️ Code Snapshots

🔗 Reproduce Link

🤔 Steps to Reproduce

😊 Expected Behavior

我们希望 能准确区分开 ‘’,‘null’ ,null

😅 Current Behavior

在平铺模式中,null 显示为‘null’, 'null' 显示'null', '' 显示‘-’ , 明细表下 null 和'' 都显示为‘-’

💻 System information

Environment Info
System
Browser
@lijinke666
Copy link
Member

已知问题: #2766 #2808

这是 1.x 版本的设计缺陷, 简单来说就是由于透视表行列头维值默认都是字符串, 内部会强制 String() 处理, 所以如果维值为 null 时会变成 "null", 而明细表除了表头都是数值, 所以能正常展示.

如需使用 1.x 版本, 建议预清洗下数据, 比如把维值为 null 的转成 "", 这样就能正常展示为 "-", 由于涉及到一些重构, 和破坏性改动, 会在 2.x 版本中解决该问题 #2810

@lijinke666 lijinke666 self-assigned this Jul 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants