我的react-native版本是0.38.0
<TextInput onBlur={ (event) =>
this.handleBlurCheck(event.nativeEvent.text,params) } />
Run Code Online (Sandbox Code Playgroud)
在 function 中handleBlurCheck
,我在 iOS 上得到了值,但undefined
在 Android 上得到了值。
TextInput
android平台模糊时如何获取值?
iOS 上的对象nativeEvent
:
nativeEvent:{
eventCount: 5,
target: 1046,
text: '56'
}
Run Code Online (Sandbox Code Playgroud)
安卓上nativeEvent
的:
nativeEvent:{
target: 1046,
}
Run Code Online (Sandbox Code Playgroud)