Skip to content

Commit

Permalink
EPMRPP-88973 || Provide optional tooltipRoot prop for the withTooltip…
Browse files Browse the repository at this point in the history
… HOC
  • Loading branch information
AmsterGet committed Jan 8, 2024
1 parent 05ad314 commit a2b0a4c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/src/components/main/tooltips/tooltip/withTooltip.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,12 @@ export const withTooltip = ({ TooltipComponent, data = {} }) => (WrappedComponen
static propTypes = {
showTooltip: PropTypes.bool,
children: PropTypes.node,
tooltipRoot: PropTypes.instanceOf(Element),
};
static defaultProps = {
showTooltip: true,
children: null,
tooltipRoot: null,
};
state = {
shown: false,
Expand Down Expand Up @@ -100,7 +102,7 @@ export const withTooltip = ({ TooltipComponent, data = {} }) => (WrappedComponen
</div>
)}
</Popper>,
this.tooltipRoot,
this.props.tooltipRoot || this.tooltipRoot,
)}
</Manager>
);
Expand Down

0 comments on commit a2b0a4c

Please sign in to comment.