当我添加模态组件时,TextInput组件内的值或文本不可见(在iOS中)

问题描述 投票:0回答:1

[herein image the placeholder or input is not visible in TextInput 我已经尝试了所有方法,包括调整TextInput组件的高度,但是当我在ios中运行expo时输入不可见

这是我的InputComponent返回(

 <Modal  visible={props.visible} >
    <View style={styles.inputView}>
        <TextInput placeholder="Course Goal" style={styles.input}
            onChangeText={(enteredGoal)=>(setGoalHandler(enteredGoal))} 
            value={enteredGoal}/>
        <View style={styles.inputButtons}>
            <View style={styles.button}><Button  title="Cancel" 
                color="red" onPress={props.changeModal}/></View>
            <View style={styles.button}><Button title="Add" onPress={()=> 
                 {props.onAddGoal(enteredGoal),
                setEnteredGoal('')}}/></View>
            </View>
       </View>
  </Modal>

)

}

expo react-native-ios
1个回答
0
投票

显然是个错误,您可以通过为输入设置颜色来解决它

© www.soinside.com 2019 - 2024. All rights reserved.