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

🐛 透视表设置col自定义函数calcFunc 接收的arr一直都是空数组[] #1381

Closed
aimerthyr opened this issue May 27, 2022 · 4 comments
Assignees

Comments

@aimerthyr
Copy link
Contributor

复现链接:https://codesandbox.io/s/nostalgic-yonath-9wyg0u?file=/index.ts:12647-12650

  1. 我给透视表行和列都设置了自定义的汇总函数calcFunc
  2. 我加了两个打印的地方 row里面的打印是正确的 但是col里面的打印永远都是空数组
  3. 而且还有一个问题就是 第一次滚动到最右边时 列汇总的计算好像是不会触发的 必须要重新拉到最左边 然后再拉到最右边才会触发
@github-actions
Copy link
Contributor

你要找的是不是 (You may look for issues):

  1. 70% 🐛 #1355

🤖 By issues-similarity-analysis

@stone-lyl stone-lyl self-assigned this May 28, 2022
@lijinke666 lijinke666 added the 🐛 bug 这个是一个 bug label May 31, 2022
@github-actions
Copy link
Contributor

你好 @Leon-0606,很抱歉给你带来了不好的体验, 我们会尽快排查问题并修复, 请关注后续发布日志.

Hello, @Leon-0606, We are so sorry for the bad experience. We will troubleshoot and fix the problem as soon as possible. Please pay attention to the follow-up change logs.

@stone-lyl stone-lyl removed the 🐛 bug 这个是一个 bug label Jun 1, 2022
@stone-lyl
Copy link
Member

你无法打印出 col 中的 query 和 data 是因为,设置了无用的数据,导致数据解析时,无法找到对应的 位置。
image

问题解决

  1. 如果你希望总计数据通过,你返回的数据进行展示,你可以设置小计总计数据。如下:
    image
  2. 如果你希望数据通过 calcFunc 计算得出,就不需要传递总计数据
    可以查看这个demo : https://codesandbox.io/s/zong-ji-xiao-ji-shu-ju-she-zhi-cuo-wu-pc6uns?file=/index.ts:5076-5117
    (我删除了一些数据)

希望我的解答能帮助到你,如果没有其他疑问,我后续会关闭这个 issue 。

@aimerthyr
Copy link
Contributor Author

好的 多谢 明白了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants