【发布时间】:2019-12-26 05:33:15
【问题描述】:
我有一个TextInput如下图,
<TextInput
style={{borderWidth: 1, borderColor: "#dedede", width: '90%', marginTop: 20, borderRadius: 1}}
placeholder={'Tell us more about our service'}
multiline = {true}
numberOfLines = {10}
value={this.state.customerFeedback}
onChangeText={customerFeedback => this.setState({ customerFeedback })}
underlineColorAndroid="transparent"
/>
因为我给了numberOfLines = {10},如果我输入超过10行的文字必须在TextInput区域内滚动。但在我的情况下,TextInput 的大小正在逐渐增加,如下图所示,
如果我们查看TextInput,就会发现超过 10 行。
谁能告诉我如何根据numberOfLines 道具限制TextInput 区域?谢谢。
【问题讨论】: