Skip to content

Commit

Permalink
fix(modal): fix onDismiss logic for the modal component on iOS
Browse files Browse the repository at this point in the history
  • Loading branch information
bartolkaruza committed Sep 18, 2019
1 parent d898574 commit c37d813
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions Libraries/Modal/Modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,13 +169,10 @@ class Modal extends React.Component<Props> {
};
}

componentWillUnmount() {
if (this.props.onDismiss != null) {
UNSAFE_componentWillReceiveProps(nextProps: Props) {
if (!nextProps.visible && this.props.visible && this.props.onDismiss) {
this.props.onDismiss();
}
}

UNSAFE_componentWillReceiveProps(nextProps: Props) {
Modal._confirmProps(nextProps);
}

Expand Down

0 comments on commit c37d813

Please sign in to comment.