小编Alv*_*vin的帖子

反应原生 TextInput onBlur 在 android 上得到 unedfined

我的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 上得到了值。

TextInputandroid平台模糊时如何获取值?

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)

reactjs react-native

1
推荐指数
1
解决办法
5047
查看次数

标签 统计

react-native ×1

reactjs ×1