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
Issue #364 - dangling tooltips #383
Issue #364 - dangling tooltips #383
Conversation
return ( | ||
<Tooltip placement="topLeft" title={tip} arrowPointAtCenter> | ||
<Tooltip placement="topLeft" title={!disabled && tip} arrowPointAtCenter> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is a nice workaround for the issue!
Can we read the disabled property of button
or do we need a separate prop for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't think that we can use the disabled prop of the supplied button. In the general case the value fo the button
prop may not be an instance of the Button
component so may not have a disabled
prop. For example, it might be a Button wrapped in some other component (e.g., a Dropzone). So button
would be an instance of Dropzone.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am curious why the Bootstrap tooltip does not work. I'm quite sure that we use it in many other places (on other sites) that are not buttons. While the workaround is ok, it feels unsustainable to pass duplicate disabled
props everywhere that we use tooltips.
Actually, i'm not so happy about this workaround as well. |
I've found what was the issue with Bootstrap, so i've brought it back to the implementation of Tooltips. |
@storrisi I am getting an error in ButtonWithTooltip when loading the defintiions page. It seems that
|
It's probably because of the merge of the #375 , i'm gonna update this one since something has changed |
@jeffmcaffer fixed, now it should be fine, thanks for catching up |
Fixes #364
Seems like this is a knows issue of ant-design when there is a Tooltip on a disabled Button, as explained here: ant-design/ant-design#9581
I've tried to replace the Tooltip with the Bootstrap one, but it doesn't work on elements that are not buttons, like a DropDown for example.
As a solution, i've hidden the tooltip if a disabled prop is passed to the render component.