Guest User

Untitled

a guest
Jan 23rd, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.58 KB | None | 0 0
  1. <View style={{
  2. width:dwidth-20,marginHorizontal:20,height:80,marginTop:height/7}}>
  3.  
  4. <TextInput
  5. style={{color:'black',width:width-60, borderColor: 'black'}}
  6. placeholder="Ask your Question ?"
  7. underlineColorAndroid='black'
  8. autoCapitalize="words"
  9. placeholderTextColor="black"
  10. keyboardType = "default"
  11. error = {this.state.errpwd}
  12. onBlur={() => this.setState({errpwd:""})}
  13. onChangeText={ (questionText) => this.setState({input: questionText}) }/>
  14.  
  15. <View style={styles.section}>
  16. <PowerTranslator style={styles.p}
  17. text={'user input: ' + this.state.input} />
  18. </View>
  19. </View>
  20.  
  21. <TextInput
  22. style={styles.input}
  23. value={this.state.inputValue} // Here you can set the value you want
  24. controlled={true}
  25. onChangeText={(text) => this.setState({ inputValue: text })}
  26. onSubmitEditing={this.handleSubmitEditing.bind(this)}
  27. />
  28.  
  29. <TextInput
  30. ref = {yourTextInputRef}
  31. style={{color:'black',width:width-60, borderColor: 'black'}}
  32. placeholder="Ask your Question ?"
  33. underlineColorAndroid='black'
  34. autoCapitalize="words"
  35. placeholderTextColor="black"
  36. keyboardType = "default"
  37. error = {this.state.errpwd}
  38. onBlur={() => this.setState({errpwd:""})}
  39. onChangeText={ (questionText) => this.setState({input: questionText}) }/>
  40.  
  41. this.refs.yourTextInputRef.setNativeProps({text: 'SET_YOUR_VALUE_HERE'});
Add Comment
Please, Sign In to add comment