在textInput组件外部点击以调用onBlur

问题描述

render(){
   return(
      <View style={{ flex:1 }}>
         <TextInput style={{ backgroundColor:'red'}} onFocus={() => alert('Focued')}
            onBlur={() => alert('Blurred') } 
         />
      </View>
   )
}

在上面的代码片段中,当我单击textinput时,焦点操作正在运行,但是当我在textinput组件之外单击时,不会触发onBlur。

我不想将组件包含在滚动视图中

有人可以帮助我吗?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)