Skip to content

Commit

Permalink
Merge pull request #15563 from Expensify/revert-15298-fix-issue-14848
Browse files Browse the repository at this point in the history
(cherry picked from commit 0962a8c)
  • Loading branch information
flodnv authored and OSBotify committed Feb 28, 2023
1 parent 16071d4 commit e276961
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
7 changes: 1 addition & 6 deletions src/components/Modal/BaseModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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}
Expand Down
1 change: 0 additions & 1 deletion src/components/Modal/index.web.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ const Modal = (props) => {
<BaseModal
// eslint-disable-next-line react/jsx-props-no-spreading
{...props}
shouldUseOnDismiss={props.fullscreen}
onModalHide={hideModal}
onModalShow={showModal}
>
Expand Down

0 comments on commit e276961

Please sign in to comment.