mirror of
https://github.com/zhigang1992/react-native-paper.git
synced 2026-06-12 17:18:12 +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} />
|
<View style={StyleSheet.absoluteFill} />
|
||||||
</TouchableWithoutFeedback>
|
</TouchableWithoutFeedback>
|
||||||
)}
|
)}
|
||||||
<Animated.View style={[{ opacity: this.state.opacity }]}>
|
<Animated.View style={[{ opacity: this.state.opacity }, styles.childrenWrapper]}>
|
||||||
{children}
|
{children}
|
||||||
</Animated.View>
|
</Animated.View>
|
||||||
</Animated.View>
|
</Animated.View>
|
||||||
@@ -171,4 +171,7 @@ const styles = StyleSheet.create({
|
|||||||
...StyleSheet.absoluteFillObject,
|
...StyleSheet.absoluteFillObject,
|
||||||
justifyContent: 'center',
|
justifyContent: 'center',
|
||||||
},
|
},
|
||||||
|
childrenWrapper: {
|
||||||
|
flex: 1
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user