[英]React Native <Text> inside <Grid> <Col> is not wrapping
I use react-native-easy-grid in a react-native app and I have a text element inside element of . 我在react-native app中使用react-native-easy-grid,我在元素内部有一个text元素。 THe text seems to overflow out of the column but doesn't wrap around.
文本似乎溢出了列,但没有环绕。
I have tried adding flexString, flexDirection, flexWrap properties as provided in other questions like React native text going off my screen, refusing to wrap. 我已经尝试添加flexString,flexDirection,flexWrap属性,如其他问题所提供,例如React本机文本从屏幕上消失,拒绝换行。 What to do?
该怎么办? but it isn't working for Grid
但它不适用于Grid
render() {
return (
<View>
<Grid>
<Row style={{ height: 50, padding: 10 }}>
<Col><AntIcon name="warning" size={25} /></Col>
<Col style={{flexDirection:'row'}}>
<Text style={{flex: 1, flexShrink: 1}}>
0 devices could not sync'd to cloud since you are not the owner.
</Text>
</Col>
</Row>
</Grid>
</View>
);
}
I expect the text "0 devices could not sync;d to cloud since you are not owner within the screen of the device" but its cut off and shows only partial string 我希望文本“0设备无法同步; d到云,因为你不是设备屏幕内的所有者”但它的截止并显示只有部分字符串
I realise what the issues was. 我意识到问题是什么。 it was the height parameter i have added that was messing it up
这是我添加的高度参数搞砸了
I made height 100 and it started working fine 我做了100高,它开始工作正常
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.