【发布时间】:2021-10-12 07:56:21
【问题描述】:
我这样写代码:
<View style={{flex:1}}>
<ScrollView style={{flex:1, backgroundColor='#ffffff'}}>
<TextInput style={styles.inputText}
value={this.state.mail}
placeholder="Email"
onChangeText={(text)=>this.setState.(mail:text)}/>
<TextInput style={styles.inputText}
value={this.state.fName}
placeholder="First name"
onChangeText={(text)=>this.setState.(fName:text)}/>
<TextInput style={styles.inputText}
value={this.state.sName}
placeholder="Second name"
onChangeText={(text)=>this.setState.(sName:text)}/>
</ScrollView>
</View>
但是当我在 TextInput 中拖动 start 时不会滚动! 我像这样拖动图片: enter image description here 但不能滚动...
【问题讨论】:
-
尝试再添加 3 个 TextInput
-
从滚动视图中移除 flex:1。
标签: javascript reactjs react-native scrollview react-native-textinput