Skip to content

Commit 1089437

Browse files
authored
Remove reanimated fix (#45)
1 parent 96eefc7 commit 1089437

File tree

3 files changed

+44
-45
lines changed

3 files changed

+44
-45
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,11 @@ Common:
162162

163163
- Create separate documentation page
164164

165+
## Troubleshooting
166+
167+
- Reanimated modal has wrong size for the first only render:
168+
https://github.com/software-mansion/react-native-reanimated/issues/6659
169+
165170
## Versions
166171

167172
| library version | react-native | old arch | new arch | docs |

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-multiple-modals",
3-
"version": "3.0.2",
3+
"version": "3.0.3",
44
"description": "Native implementation with the ability to display multiple Modals",
55
"author": "Pavel Pakseev <[email protected]> (https://github.com/paufau)",
66
"license": "MIT",

src/ModalView.tsx

Lines changed: 38 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -104,52 +104,46 @@ export const ModalView: FC<ModalViewProps> = ({
104104
animationType = 'none',
105105
statusBarTranslucent,
106106
}) => {
107-
// RNTModalView is wrapped in a View to fix the reanimated layout entering issue
108-
// https://github.com/software-mansion/react-native-reanimated/issues/6659
109107
return (
110-
<View>
111-
<RNTModalView
112-
style={styles.container}
113-
statusBarTranslucent={statusBar?.translucent ?? statusBarTranslucent}
114-
statusBarIconsStyle={statusBar?.barStyle ?? undefined}
115-
onPressBackAndroid={() =>
116-
onRequestDismiss?.(DismissalSource.BackButton)
117-
}
118-
animationType={animationType}
119-
>
120-
<View collapsable={false} style={styles.flex}>
121-
{isIOS && statusBar && !disableDefaultStatusBarIOS ? (
122-
<StatusBar {...statusBar} />
123-
) : null}
124-
<GestureHandlerRootView style={styles.flex}>
125-
<View style={[styles.backdropContainer]}>
126-
<BackdropPressableComponent
127-
accessibilityLabel={backdropAccessibilityLabel}
128-
accessibilityHint={backdropAccessibilityHint}
129-
style={styles.flex}
130-
onPress={() => onRequestDismiss?.(DismissalSource.Backdrop)}
131-
>
132-
{renderBackdrop ? (
133-
renderBackdrop()
134-
) : (
135-
<View
136-
style={[styles.flex, { backgroundColor: backdropColor }]}
137-
/>
138-
)}
139-
</BackdropPressableComponent>
108+
<RNTModalView
109+
style={styles.container}
110+
statusBarTranslucent={statusBar?.translucent ?? statusBarTranslucent}
111+
statusBarIconsStyle={statusBar?.barStyle ?? undefined}
112+
onPressBackAndroid={() => onRequestDismiss?.(DismissalSource.BackButton)}
113+
animationType={animationType}
114+
>
115+
<View collapsable={false} style={styles.flex}>
116+
{isIOS && statusBar && !disableDefaultStatusBarIOS ? (
117+
<StatusBar {...statusBar} />
118+
) : null}
119+
<GestureHandlerRootView style={styles.flex}>
120+
<View style={[styles.backdropContainer]}>
121+
<BackdropPressableComponent
122+
accessibilityLabel={backdropAccessibilityLabel}
123+
accessibilityHint={backdropAccessibilityHint}
124+
style={styles.flex}
125+
onPress={() => onRequestDismiss?.(DismissalSource.Backdrop)}
126+
>
127+
{renderBackdrop ? (
128+
renderBackdrop()
129+
) : (
130+
<View
131+
style={[styles.flex, { backgroundColor: backdropColor }]}
132+
/>
133+
)}
134+
</BackdropPressableComponent>
135+
</View>
136+
<ScrollContextResetter>
137+
<View
138+
pointerEvents='box-none'
139+
style={[styles.content, contentContainerStyle]}
140+
>
141+
{children}
140142
</View>
141-
<ScrollContextResetter>
142-
<View
143-
pointerEvents='box-none'
144-
style={[styles.content, contentContainerStyle]}
145-
>
146-
{children}
147-
</View>
148-
</ScrollContextResetter>
149-
</GestureHandlerRootView>
150-
</View>
151-
</RNTModalView>
152-
</View>
143+
</ScrollContextResetter>
144+
</GestureHandlerRootView>
145+
</View>
146+
</RNTModalView>
153147
);
154148
};
155149

0 commit comments

Comments
 (0)