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

🙏能不能出一个动态设置表头icon的 api #3016

Closed
z-h2o opened this issue Dec 5, 2024 · 2 comments
Closed

🙏能不能出一个动态设置表头icon的 api #3016

z-h2o opened this issue Dec 5, 2024 · 2 comments
Assignees
Labels
🙏feature request 新需求支持

Comments

@z-h2o
Copy link

z-h2o commented Dec 5, 2024

🏷 Version

Package Version
@antv/s2 2.0.1

-->

Package Version
@antv/s2 2.0.1

Sheet Type

  • [ √] PivotSheet
  • [ √] TableSheet

🖋 Description

希望表头的icon设置可以动态修改, 我现在的需求是表头有个排序图标, 点击排序图标后可以把图标变为升序或者降序的icon, 目前是不支持动态更新icon的,希望可以出这个功能🙏🏻

🧐 Suggest the API

直接在现有api设计的基础上新增一个函数, 点击的时候可以获取当前图标的类型, 然后返回一个新的图标展示, 这样每次点击都可以获取上一次的图标来更换下一次要展示的图标

@z-h2o z-h2o added the 🙏feature request 新需求支持 label Dec 5, 2024
@javenl
Copy link

javenl commented Dec 11, 2024

目前的解决方案是,通过设置多个icon, 然后通过displayConditon控制单个icon显示

@lijinke666
Copy link
Member

是的, 楼上正解, 现有配置可以实现, 配置多个 headerActionIcons, 点击时记录状态, displayConditon 根据状态决定展示哪个 icon

如需支持更方便的动态设置, 欢迎 PR.

@lijinke666 lijinke666 self-assigned this Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🙏feature request 新需求支持
Projects
None yet
Development

No branches or pull requests

3 participants