mirror of
https://github.com/zhigang1992/react-native-paper.git
synced 2026-06-10 15:58:52 +08:00
fix: fix issue that Modal children cannot grow (#491)
Add `flex:1` to Modal to fix the issue that `Modal` children cannot grow. fixes #471
This commit is contained in:
@@ -154,7 +154,7 @@ class Modal extends React.Component<Props, State> {
|
||||
<View style={StyleSheet.absoluteFill} />
|
||||
</TouchableWithoutFeedback>
|
||||
)}
|
||||
<Animated.View style={[{ opacity: this.state.opacity }]}>
|
||||
<Animated.View style={[{ opacity: this.state.opacity }, styles.childrenWrapper]}>
|
||||
{children}
|
||||
</Animated.View>
|
||||
</Animated.View>
|
||||
@@ -171,4 +171,7 @@ const styles = StyleSheet.create({
|
||||
...StyleSheet.absoluteFillObject,
|
||||
justifyContent: 'center',
|
||||
},
|
||||
childrenWrapper: {
|
||||
flex: 1
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user