-
Notifications
You must be signed in to change notification settings - Fork 70
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
add support to hide tooltips, key => seriesKey to avoid React prop clash. #73
Conversation
what do you think about duplicating |
@@ -94,6 +94,10 @@ class WithTooltip extends React.PureComponent { | |||
tooltipData, | |||
}; | |||
|
|||
const tooltipContent = renderTooltip && tooltipOpen && TooltipComponent ? |
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 don't think you need the ternary. This should work just fine:
const tooltipContent = renderTooltip && tooltipOpen && TooltipComponent && renderTooltip(tooltipData);
...
{toolTipContent && <TooltipComponent ... />
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.
Looks good! One comment
thanks for the comments. I'd rather not always pass |
this PR makes the following improvements 🚀
renderTooltip
is falsyseriesKey
instead ofkey
in onMouseMove event signature (relevant to StackedBarSeries and GroupedBarSeries only)cc @alecklandgraf