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 getContainer 延时修改不生效 #1711

Closed
2 tasks
Bernicechl opened this issue Aug 26, 2022 · 4 comments
Closed
2 tasks

🐛tooltip getContainer 延时修改不生效 #1711

Bernicechl opened this issue Aug 26, 2022 · 4 comments
Assignees
Labels
🐛 bug 这个是一个 bug

Comments

@Bernicechl
Copy link

🏷 Version

latest

Sheet Type

  • PivotSheet
  • TableSheet

🖋 Description

tooltip getContainer 延时修改的话不生效,可以查看dom中tooltip的挂载位置.
同样的代码,都重新设置了tooltipContainer:如果不延时那么tooltip挂在container上;如果延时依旧挂在body

🔗 Reproduce Link

https://codesandbox.io/s/10qm2v?file=/index.ts

@Bernicechl Bernicechl changed the title 🐛 🐛tooltip getContainer 延时修改不生效 Aug 26, 2022
@Bernicechl
Copy link
Author

Bernicechl commented Aug 26, 2022 via email

@wjgogogo wjgogogo added the 🐛 bug 这个是一个 bug label Aug 29, 2022
@github-actions
Copy link
Contributor

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

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

@lijinke666 lijinke666 self-assigned this Sep 1, 2022
@lijinke666
Copy link
Member

  1. 如图, 没看出来有什么问题
    image

  2. [不生效的定义是什么?] 你给的 demo 根本跑步起来, 你把官网的 demo 拷贝过来, 请至少保证能运行

image

  1. 如果你指的是 setTimeout 结束后, #container 上没有渲染 tooltip 容器, getContainer 是在 tooltip 显示的时候 (s2.showTooltip) 才执行, 并不是初始化就执行

const container = this.getContainer();

@Bernicechl
Copy link
Author

Bernicechl commented Sep 13, 2022

不好意思没有描述清楚。我的意思是,

  1. 首次渲染时tooltip内容为‘hhh’,默认挂在body上
  2. 延时10s修改tooltip内容为‘aaa’,并修改getContainer容器为'#container'(canvas的父容器)
  3. 点击单元格,tooltip显示为'hhh',挂在body上
  4. 10s后点击单元格,tooltip显示为‘aaa’,仍然挂在body而非container上。此处需要挂在container上

复现链接:https://codesandbox.io/s/zealous-ardinghelli-vptd6s?file=/index.ts:0-2329 此处看不到tooltip内容,可将代码拷到demo中查看

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug 这个是一个 bug
Projects
None yet
Development

No branches or pull requests

3 participants