在 TextInput 中粘贴值期间不会触发 onChangeText

onChangeText is not triggered during pasting value in TextInput

onChangeText 在 IOS 的 TextInput 中粘贴值时未触发。怎么可能修复它? 这是我的 TextInput

 <TextInput
                    value={this.state.username}
                    style={styles.input}
                    placeholder='Email'
                    placeholderTextColor='#9D9D9D'
                    returnKeyType='next'
                    selectTextOnFocus={true} 
                    onSubmitEditing={() => this.passwordRef.focus()} 
                    autoCapitalize='none'
                    autoCorrect={false}
                    autoComplete='email'
                    keyboardType='email-address'
                    onChangeText={ text => this.onChangeEmail('username', text) }
                /> 



 onChangeEmail = async (key, value) => {
        await this.setState({ [key]: value })
        const { username } = this.state
        if (username.trim() === "") {
            this.setState(() => ({ emailError: "Required"}));
            return
          }
          else if (!username.match(/.+@.+/) ){
            this.setState(() => ({ emailError: "Not an email address"}));
            return
          }
          else {
                 this.setState(() => ({ emailError: null}));
               }
    }

我找到了这个问题的解决方案,而不是 onChangeText,我使用 onChange,之后 TextInput 开始按预期工作。