S2 icon indicating copy to clipboard operation
S2 copied to clipboard

🐛组内排序使用sortFunc会出现错误

Open tufaofu opened this issue 1 year ago • 4 comments

🏷 Version

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

Sheet Type

  • [x] PivotSheet
  • [ ] TableSheet
  • [ ] GridAnalysisSheet
  • [ ] StrategySheet
  • [ ] EditableSheet

🖋 Description

组内排序使用sortFunc,如果两个分组内部的数据相同,会按照一样的顺序排序,不会按照对应数值的大小进行排序 image

🔗 Reproduce Link

https://codesandbox.io/p/sandbox/interesting-ride-r3sw4q?file=%2Fsrc%2Findex.js

😊 Expected Behavior

排序顺序不对,希望各个分组能按照对应值的大小进行排序

💻 System information

Environment Info
System mac
Browser 120.0.6099.199

tufaofu avatar Jan 17 '24 03:01 tufaofu

你好 @tufaofu,感谢你的建议, 我们会及时评估和排期, 谢谢! 当然, 如果能贡献 PR 帮助我们改进, 不胜感激!

Hello, @tufaofu, thanks for your advice. We will evaluate and schedule in time. Thank you! you could implement it by yourself through the customization capabilities provided by S2. Thanks so much for your understanding.

github-actions[bot] avatar Jan 18 '24 08:01 github-actions[bot]

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

Hello, @tufaofu, 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.

github-actions[bot] avatar Jan 18 '24 09:01 github-actions[bot]

这个是排序场景的不足,内部会最终针对返回值进行维度拼接,但是因为是同样的值,做拼接时就有有问题,你可以自行拼接完成的维度信息:https://codesandbox.io/p/sandbox/sharp-kalam-szlrc4?file=%2Fsrc%2Findex.js%3A76%2C1

wjgogogo avatar Jan 18 '24 09:01 wjgogogo

这样是可以的,非常感谢

tufaofu avatar Feb 01 '24 03:02 tufaofu