The problems =>https://drive.google.com/open?id=1KwBWMVsj-0PFzt9cLfLuZ9cTvkqjIob8
This is my code
export default function TextInp(props) {
const [ansVal, setAnsVal] = useState(props.data.ans);
const answer = (ans) => {
setAnsVal(ans);
props.answer(ans);
};
return (
<View style={styles.view}>
<TextInput
placeholder={props.placeholder}
style={props.free ? styles.freeContainer : styles.container}
onChangeText={(text)=>answer(text)}
defaultValue={ansVal}
/>
</View>
);
}
PS. the TextInput is inside ScrollView
. I'm not sure if this is the cause of the problem.