textinput value from state reverts, need to tap text twice for it to save or tap backspace twice to delete iOS #48011
Labels
Component: TextInput
Related to the TextInput component.
Needs: Author Feedback
Needs: Repro
This issue could be improved with a clear list of steps to reproduce the issue.
Newer Patch Available
Platform: iOS
iOS applications.
Description
When I use type in a character or delete a character it flickers and puts back the character or deletes the character
The following is my code
//import area
import {
StyleSheet,
View,
Text,
Image,
TouchableOpacity,
Appearance,
ScrollView,
Platform,
TextInput as NativeTextInput
} from 'react-native';
//constructor in the component
constructor(props) {
super(props);
this.state = {
background_color: '#5c5c5c',
user_data: [],
expandSttGeneralList: false,
expandSttList: false,
expandSttSellList: false,
expandUserGeneralList: false,
expandUserList: false,
expandUserSellList: false,
introductionModal: false,
introductionPage1: true,
stt_general_buy_rules: [],
stt_general_buy_rules_list: <></>,
}
//script callback when textchange
iOShandleTextChange(text) {
};
//textinput
<NativeTextInput
numberOfLines={3}
maxLength={1000}
value={this.state.rule_description}
onChangeText={text => this.iOShandleTextChange(text)}
style={{ width: '100%', height: 800, padding: 10, fontSize: 15, textAlign: "center" }}
/>
Pls help this has been frustrating
Steps to reproduce
React Native Version
0.74.1
Output of
npx react-native info
Screenshots and Videos
IMG_5053.1.MP4
The text was updated successfully, but these errors were encountered: