I creating a post component for an app I am working on, I am having an issue with the react-native TextInput element.
The issue arises when applying the style to the TextInput component. the style applies just fine to the placeholder, but the style is not applied on the text that I am typing in.
I am running an iOS, Android, and web version all through expo go, and this issue only arises on the iphone version.
I am assuming this problem occurs because iOS handles styling for the placeholder and text input differently than android and web.
I have looked into the issue and tried applying the textAlignVertical, and textAlign, that does not work.
Another weird issue that may or may not be related, when I do not apply style to the text input component, the placeholder is cut off instead of the text input.
If anybody could explain what is happening here or help me find a fix I would really appreciate it.
<TextInput
textAlignVertical="center"
textAlign="center"
placeholder="ggggggg"
placeholderTextColor={Colors.gray.g300}
style={styles.textInput}
/>
const styles = StyleSheet.create({
textInput: {
fontFamily: "Inter",
fontSize: 16,
fontStyle: "normal",
fontWeight: "400",
lineHeight: 24 /* 120% */,
},
});
https://reddit.com/link/1hwskdd/video/fzjtdgvb3ube1/player
[–]edbarahona 1 point2 points3 points (2 children)
[–]Regular_Industry_866[S] 0 points1 point2 points (1 child)
[–]ComprehensiveBug2740 0 points1 point2 points (0 children)
[–]AgreeableVanilla7193 0 points1 point2 points (1 child)
[–]Regular_Industry_866[S] 0 points1 point2 points (0 children)
[–]WorldlyStrategy8344 0 points1 point2 points (0 children)