Skip to content

Commit

Permalink
fix(Tooltip): only callback parent onChange if it exists (#9558)
Browse files Browse the repository at this point in the history
Co-authored-by: Taylor Jones <tay1orjones@users.noreply.github.com>
  • Loading branch information
tw15egan and tay1orjones committed Sep 1, 2021
1 parent ceee5c0 commit 4c31ac6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/react/src/components/Tooltip/Tooltip.js
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ class Tooltip extends Component {
}

_handleUserInputOpenClose = (event, { open }) => {
if (this.isControlled) {
if (this.isControlled && this.props.onChange) {
// Callback to the parent to let them decide what to do
this.props.onChange(event, { open });
return;
Expand Down

0 comments on commit 4c31ac6

Please sign in to comment.