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

🐛 tooltip 配置无效 #848

Closed
WeiShengv99 opened this issue Dec 1, 2021 · 4 comments
Closed

🐛 tooltip 配置无效 #848

WeiShengv99 opened this issue Dec 1, 2021 · 4 comments

Comments

@WeiShengv99
Copy link

🏷 Version

Package Version
@antv/s2 - 1.1.2
@antv/s2-react - 1.1.1

🖋 Description

tooltip配置无效

⌨️ Code Snapshots

image

🔗 Reproduce Link

https://codesandbox.io/s/cool-kirch-qs5vk?file=/src/App.tsx

🤔 Steps to Reproduce

点击展示 tooltips

😊 Expected Behavior

展示自定义 tooltips

😅 Current Behavior

配置不生效

💻 System information

chrome 96.0.4664.55

@lijinke666
Copy link
Member

lijinke666 commented Dec 1, 2021

你好, @WeiShengv99 最新版本 tooltip 有一点修改, 自定义通过 content 透出, 即 tooltipComponent 修改成 content 即可

const s2Options = {
  tooltip: {
-   tooltipComponent: ""
+   content: ""
  }
}
const s2 = new PivotSheet()

- s2.showTooltip({ element: "" })
+ s2.showTooltip({ content: "" })
- s2.tooltip.show({ element: "" })
+ s2.tooltip.show({ content: "" })

详情见文档 https://s2.antv.vision/zh/examples/react-component/tooltip#custom-content

@lijinke666
Copy link
Member

给提issue的方式点赞, 终于有一个是按照模板填写的了 👍🏻

@WeiShengv99
Copy link
Author

@lijinke666
非常感谢你的回复
顺便问一下 , tooltips 目前支持 hover 事件触发展示吗,没有找到相关的文档。

@xingwanying
Copy link
Member

@lijinke666 非常感谢你的回复 顺便问一下 , tooltips 目前支持 hover 事件触发展示吗,没有找到相关的文档。

目前还没有自定义hover方式的透出,关注下这个 issue,#821

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