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

Popover does not work for Checkbox or Radio #3455

Closed
Centaur opened this issue Oct 17, 2016 · 6 comments
Closed

Popover does not work for Checkbox or Radio #3455

Centaur opened this issue Oct 17, 2016 · 6 comments
Assignees
Labels
🐛 Bug Ant Design Team had proved that this is a bug.

Comments

@Centaur
Copy link

Centaur commented Oct 17, 2016

发生问题的环境是:

  • antd 版本: 2.1.0
  • 操作系统及其版本:
  • 浏览器及其版本:

您做了什么?

在 Checkbox 或 Radio 外面包一层 Popover

您期待的结果是:

鼠标移到 Checkbox或Radio 上时显示 Popover

实际上的结果是:

不显示

可重现的在线演示

https://jsfiddle.net/0camhs5r/3/

@afc163 afc163 added the 🐛 Bug Ant Design Team had proved that this is a bug. label Oct 17, 2016
@afc163 afc163 self-assigned this Oct 17, 2016
@yesmeck
Copy link
Member

yesmeck commented Oct 28, 2016

@afc163 这个我来看看吧

@afc163
Copy link
Member

afc163 commented Oct 28, 2016

👌,Checkbox 外层需要传递一些参数过去。

@afc163 afc163 assigned yesmeck and unassigned afc163 Oct 28, 2016
@yesmeck
Copy link
Member

yesmeck commented Oct 28, 2016

其实不止CheckboxRadio,像DatePickerRating等等没有把onMouseEnteronMouseLeave传给组件里最外层 DOM 标签的都不能直接放在 Popover 里,我的建议是自己在外面套一层原生的 DOM 标签:

<Popover content="abc" title="checkbox">
  <span><Checkbox>It works</Checkbox></span>
</Popover>

@benjycui
Copy link
Contributor

@yesmeck 这个结论更新到文档中吧,Popover Tooltip 都需要。

主要是就算我们这边做了适配,开发者用第三方库的时候还是会碰到这个问题。

@afc163
Copy link
Member

afc163 commented Oct 28, 2016

碰到一个改一个,老是加 span ,我自己都用的不爽。

@lock
Copy link

lock bot commented May 3, 2018

This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.

@lock lock bot locked as resolved and limited conversation to collaborators May 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🐛 Bug Ant Design Team had proved that this is a bug.
Projects
None yet
Development

No branches or pull requests

4 participants