From dac6e35d5f78cf92f0b0b54756160cfbaa6851ca Mon Sep 17 00:00:00 2001 From: Cristi Paval Date: Tue, 28 Feb 2023 18:29:58 +0200 Subject: [PATCH] Revert "replace onModalHide with onDismiss for the web" --- src/components/Modal/BaseModal.js | 7 +------ src/components/Modal/index.web.js | 1 - 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/components/Modal/BaseModal.js b/src/components/Modal/BaseModal.js index d9fccfef3312..a4b7ed90a8fe 100644 --- a/src/components/Modal/BaseModal.js +++ b/src/components/Modal/BaseModal.js @@ -16,15 +16,11 @@ const propTypes = { /** The ref to the modal container */ forwardedRef: PropTypes.func, - - /** Ensure that callback and trap deactivation are in the same loop on the web platform */ - shouldUseOnDismiss: PropTypes.bool, }; const defaultProps = { ...modalDefaultProps, forwardedRef: () => {}, - shouldUseOnDismiss: false, }; class BaseModal extends PureComponent { @@ -113,8 +109,7 @@ class BaseModal extends PureComponent { this.props.onModalShow(); }} propagateSwipe={this.props.propagateSwipe} - onDismiss={this.props.shouldUseOnDismiss ? this.hideModal : () => {}} - onModalHide={!this.props.shouldUseOnDismiss ? this.hideModal : () => {}} + onModalHide={this.hideModal} onSwipeComplete={this.props.onClose} swipeDirection={swipeDirection} isVisible={this.props.isVisible} diff --git a/src/components/Modal/index.web.js b/src/components/Modal/index.web.js index 24c83001698c..3cb6f3561b60 100644 --- a/src/components/Modal/index.web.js +++ b/src/components/Modal/index.web.js @@ -29,7 +29,6 @@ const Modal = (props) => {