【发布时间】:2018-01-29 18:05:43
【问题描述】:
有什么方法可以重新设置 react-native 的 textinput 中的文本值吗? 如下所示,这是我正在做的: 我想在 textinput 中设置我的超级翻译文本值。我该怎么做?
<TextInput
style={{color:'black',width:width-60, borderColor: 'black'}}
placeholder="Ask your Question ?"
underlineColorAndroid='black'
autoCapitalize="words"
placeholderTextColor="black"
keyboardType = "default"
error = {this.state.errpwd}
onBlur={() => this.setState({errpwd:""})}
onChangeText={ (questionText) => this.setState({input: questionText}) }/>
<View style={styles.section}>
<PowerTranslator style={styles.p} text={'user input: ' + this.state.input} />
</View>
【问题讨论】:
标签: react-native