ant-design icon indicating copy to clipboard operation
ant-design copied to clipboard

table columns项配置fixed,render方法中使用tooltip显示位置不正确

Open Thinking80s opened this issue 3 years ago • 5 comments

Reproduction link

https://4x.ant.design/components/tooltip-cn/

Steps to reproduce

https://codesandbox.io/s/gu-ding-lie-antd-4-24-7-forked-971c53 table columns 中 render 方法 <Tooltip placement="top" title={desc} getPopupContainer={(triggerNode: any) => triggerNode} > <div className={S.desc}>{desc} </Tooltip>

What is expected?

能够正常显示tooltip位置

What is actually happening?

image

没有正常显示tooltip位置

Environment Info
antd 4.24.3
React 17.0.2
System macos 12.6.1
Browser 版本 109.0.5414.119(正式版本) (x86_64)

Thinking80s avatar Feb 01 '23 09:02 Thinking80s

You may look for issues:

  1. 56% #37995
  2. 55% #38724
  3. 55% #34129
  4. 54% #39115
  5. 51% #14325
  6. 50% #39827
  7. 50% #39362
  8. 50% #30867

🤖 By issues-similarity-analysis

github-actions[bot] avatar Feb 01 '23 09:02 github-actions[bot]

能提供一个复现问题的链接吗?

Yuiai01 avatar Feb 01 '23 09:02 Yuiai01

getPopupContainer 指向 triggerNode 也就是头像昵称所在那个框,它把 Tooltip 挡了

参考 #40191,我觉得去掉 getPopupContainer 就应该可以

luo3house avatar Feb 01 '23 09:02 luo3house

去掉是可以,但是列表滚动情况tooltip不会跟随了

Thinking80s avatar Feb 01 '23 09:02 Thinking80s

能提供一个复现问题的链接吗?

https://codesandbox.io/s/gu-ding-lie-antd-4-24-7-forked-971c53

Thinking80s avatar Feb 01 '23 09:02 Thinking80s

试试把 container 放在滚动区域上?

MadCcc avatar Feb 08 '23 09:02 MadCcc

试试把 container 放在滚动区域上?

可以使用这种方式。

afc163 avatar May 24 '23 08:05 afc163