Skip to content

Commit

Permalink
fix(bubble): add missing tooltip when using static bubble chart
Browse files Browse the repository at this point in the history
  • Loading branch information
Raphaël Benitte committed Aug 11, 2017
1 parent 80c45c2 commit 9faae31
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 43 deletions.
38 changes: 22 additions & 16 deletions src/components/charts/bubble/BubblePlaceholders.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,22 +123,28 @@ export default class BubblePlaceholders extends Component {
}

if (!animate) {
return React.createElement(
wrapperTag,
wrapperProps,
React.createElement(
containerTag,
containerProps,
children(
nodes.map(node => {
return {
key: node.data.key,
data: node,
style: _.pick(node, ['r', 'x', 'y', 'color']),
}
})
)
)
return (
<Container isInteractive={isInteractive}>
{({ showTooltip, hideTooltip }) =>
React.createElement(
wrapperTag,
wrapperProps,
React.createElement(
containerTag,
containerProps,
children(
nodes.map(node => {
return {
key: node.data.key,
data: node,
style: _.pick(node, ['r', 'x', 'y', 'color']),
}
}),
{ showTooltip, hideTooltip }
)
)
)}
</Container>
)
}

Expand Down
2 changes: 1 addition & 1 deletion src/hocs/withColors.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import withPropsOnChange from 'recompose/withPropsOnChange'
import { getColorsGenerator } from '../lib/colorUtils'

/**
* This HOC takes watch colors related props change
* This HOC watch colors related props change
* and returns the corresponding color generator function.
* Using it prevent from having a new ref each time
* we pass through the component, useful for shallow comparison.
Expand Down
26 changes: 0 additions & 26 deletions src/lib/decoratorsFromReactChildren.js

This file was deleted.

0 comments on commit 9faae31

Please sign in to comment.