halilb / react-native-textinput-effects

Text inputs with custom label and icon animations for iOS and android. Built with react native and inspired by Codrops.
MIT License
2.98k stars 291 forks source link

how to get value input with ref #81

Closed nguyenvanphuc2203 closed 5 years ago

nguyenvanphuc2203 commented 6 years ago

console.log(this.refs.sdt._lastNativeText)

undefined

<Kohana style={{ backgroundColor: '#f9f5ed',marginTop:3 }} label={'Username'} iconClass={Icon} iconName={'user'} iconColor={'#f4d29a'} labelStyle={{ color: '#91627b' }} inputStyle={{ color: '#91627b' }} useNativeDriver ref="sdt" keyboardType="numeric" />

erspark2002 commented 6 years ago
<Sae
  onChangeText={(text) => { this.setState({emailValue: text}) }}
/>

value is obtained by this.state.emailValue

halilb commented 5 years ago

Thanks for the answer @erspark2002.