Skip to content

Commit

Permalink
Refactor #1832 - Add bus.off for OverlayPanel and ConfirmPopup
Browse files Browse the repository at this point in the history
  • Loading branch information
mertsincan committed Mar 1, 2021
1 parent b6c7a22 commit d72d90f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/components/confirmpopup/ConfirmPopup.js
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,8 @@ export class ConfirmPopup extends Component {

hide(result) {
this.setState({ visible: false }, () => {
PrimeEventBus.off('overlay-click');

if (this.props.onHide) {
this.props.onHide(result);
}
Expand Down
2 changes: 2 additions & 0 deletions src/components/overlaypanel/OverlayPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,8 @@ export class OverlayPanel extends Component {

hide() {
this.setState({ visible: false }, () => {
PrimeEventBus.off('overlay-click');

if (this.props.onHide) {
this.props.onHide();
}
Expand Down

0 comments on commit d72d90f

Please sign in to comment.