Skip to content

Commit

Permalink
fix(tooltip): call parent with close when controlled (#7600)
Browse files Browse the repository at this point in the history
  • Loading branch information
scottdickerson authored Jan 22, 2021
1 parent 6e6e6a5 commit 01e2e1e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/react/src/components/Tooltip/Tooltip.js
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,8 @@ class Tooltip extends Component {

_handleUserInputOpenClose = (event, { open }) => {
if (this.isControlled) {
// Callback to the parent to let them decide what to do
this.props.onChange(event, { open });
return;
}
// capture tooltip body element before it is removed from the DOM
Expand Down

0 comments on commit 01e2e1e

Please sign in to comment.