Skip to content

Commit

Permalink
fix: modal does not open while another is open
Browse files Browse the repository at this point in the history
  • Loading branch information
tienifr committed May 23, 2024
1 parent aa9bbcf commit 2465825
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions patches/react-native-modal+13.0.1.patch
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ index b63bcfc..bd6419e 100644
buildPanResponder: () => void;
getAccDistancePerDirection: (gestureState: PanResponderGestureState) => number;
diff --git a/node_modules/react-native-modal/dist/modal.js b/node_modules/react-native-modal/dist/modal.js
index 80f4e75..3ba8b8c 100644
index 80f4e75..5a58eae 100644
--- a/node_modules/react-native-modal/dist/modal.js
+++ b/node_modules/react-native-modal/dist/modal.js
@@ -75,6 +75,13 @@ export class ReactNativeModal extends React.Component {
Expand Down Expand Up @@ -48,7 +48,17 @@ index 80f4e75..3ba8b8c 100644
if (this.didUpdateDimensionsEmitter) {
this.didUpdateDimensionsEmitter.remove();
}
@@ -525,7 +540,7 @@ export class ReactNativeModal extends React.Component {
@@ -464,6 +479,9 @@ export class ReactNativeModal extends React.Component {
InteractionManager.clearInteractionHandle(this.interactionHandle);
this.interactionHandle = null;
}
+ if (this.state.isVisible) {
+ this.props.onModalHide();
+ }
}
componentDidUpdate(prevProps) {
// If the animations have been changed then rebuild them to make sure we're
@@ -525,7 +543,7 @@ export class ReactNativeModal extends React.Component {
}
return (React.createElement(Modal, Object.assign({ transparent: true, animationType: 'none', visible: this.state.isVisible, onRequestClose: onBackButtonPress }, otherProps),
this.makeBackdrop(),
Expand Down

0 comments on commit 2465825

Please sign in to comment.