rn ios 下某些版本不能输入中文问题

最近开发业务的时候发现 textInput 不能输入问题 个人版本是 16.3react

通常都是加了 deaultValue 和 value 会有这个问题 。那么咱们换个思路ios

 解决办法 以下图react-native


import React, {Component} from 'react'
import {Platform, TextInput} from 'react-native'

class MyTextInput extends Component { this

 shouldComponentUpdate (nextProps) { code

 return Platform.OS !== 'ios'orm

 || (this.props.value === nextProps.value && !nextProps.defaultValue)开发

 || (this.props.defaultValue === nextProps.defaultValue && !nextProps.value) io

 } form

 render () {class

 return <TextInput {...this.props} /> }};

 export default MyTextInput

相关文章
相关标签/搜索