Skip to content

Commit

Permalink
Merge pull request #17494 from dukenv0307/fix/16800-blank-space-on-th…
Browse files Browse the repository at this point in the history
…e-right-side-of-tooltip

Fix: Regression of console error
(cherry picked from commit 162c649)
  • Loading branch information
puneetlath authored and OSBotify committed Apr 17, 2023
1 parent d02fb01 commit 90f7581
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/components/Tooltip/TooltipRenderedOnPageBody.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,12 @@ class TooltipRenderedOnPageBody extends React.PureComponent {
}

componentDidUpdate(prevProps) {
// We need to re-calculate the tooltipContentWidth if it is greater than maxWidth.
// So that the wrapperWidth still be updated again with correct value
if (this.state.tooltipContentWidth > prevProps.maxWidth) {
this.updateTooltipContentWidth();
}

if (prevProps.text === this.props.text && prevProps.renderTooltipContent === this.props.renderTooltipContent) {
return;
}
Expand Down

0 comments on commit 90f7581

Please sign in to comment.