Skip to content

Commit

Permalink
fix(OverflowMenu): check previous open state before calling onClose (#…
Browse files Browse the repository at this point in the history
…6721)

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Co-authored-by: TJ Egan <[email protected]>
  • Loading branch information
3 people authored Aug 27, 2020
1 parent 28b6d91 commit 74740a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/react/src/components/OverflowMenu/OverflowMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ class OverflowMenu extends Component {

componentDidUpdate(_, prevState) {
const { onClose } = this.props;
if (!this.state.open && prevState.isOpen) {
if (!this.state.open && prevState.open) {
onClose();
}
}
Expand Down

0 comments on commit 74740a7

Please sign in to comment.